Skip to content

Commit 3d4e6f6

Browse files
committed
github actions: run integration test on cassandra
to make sure we don't break compitability completly with cassandra introducing tests with one version of cassandra as well
1 parent 11d3499 commit 3d4e6f6

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

.github/workflows/integration-tests.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,20 @@ jobs:
2929
with:
3030
default: 2.7.14
3131
versions: ${{ matrix.python-version }}
32-
- name: Test with pytest
32+
- name: Test with scylla
3333
run: |
3434
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
3535
export SCYLLA_VERSION='release:5.1'
3636
./ci/run_integration_test.sh tests/integration/standard/ tests/integration/cqlengine/
3737
38-
- name: Test tablets
38+
- name: Test with scylla - tablets
3939
run: |
4040
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
4141
export SCYLLA_VERSION='unstable/master:2024-01-17T17:56:00Z'
4242
./ci/run_integration_test.sh tests/integration/experiments/
43+
44+
- name: Test with cassandra
45+
run: |
46+
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
47+
export CASSANDRA_VERSION='4.1.5'
48+
./ci/run_integration_test.sh tests/integration/standard/

ci/run_integration_test.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ pip install awscli
3030
pip install https://github.com/scylladb/scylla-ccm/archive/master.zip
3131

3232
# download version
33-
34-
ccm create scylla-driver-temp -n 1 --scylla --version ${SCYLLA_VERSION}
35-
ccm remove
36-
33+
if [[ -n "${SCYLLA_VERSION}" ]]; then
34+
ccm create scylla-driver-temp -n 1 --scylla --version ${SCYLLA_VERSION}
35+
ccm remove
36+
export MAPPED_SCYLLA_VERSION=3.11.4
37+
unset CASSANDRA_VERSION
38+
fi
39+
if [[ -n "${CASSANDRA_VERSION}" ]]; then
40+
ccm create cassandra-driver-temp -n 1 --version ${CASSANDRA_VERSION}
41+
ccm remove
42+
unset SCYLLA_VERSION
43+
fi
3744
# run test
38-
39-
export MAPPED_SCYLLA_VERSION=3.11.4
4045
PROTOCOL_VERSION=4 pytest -vv -s --log-cli-level=debug -rf --import-mode append $*
4146

tests/integration/__init__.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def get_server_versions():
8888

8989
c = TestCluster()
9090
s = c.connect()
91-
row = s.execute('SELECT cql_version, release_version FROM system.local')[0]
91+
row = s.execute('SELECT cql_version, release_version FROM system.local').one()
9292

9393
cass_version = _tuple_version(row.release_version)
9494
cql_version = _tuple_version(row.cql_version)
@@ -630,8 +630,16 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
630630
else:
631631
CCM_CLUSTER = CCMCluster(path, cluster_name, **ccm_options)
632632
CCM_CLUSTER.set_configuration_options({'start_native_transport': True})
633-
if Version(cassandra_version) >= Version('2.2'):
634-
CCM_CLUSTER.set_configuration_options({'enable_user_defined_functions': True})
633+
if Version(cassandra_version) >= Version('4.1'):
634+
CCM_CLUSTER.set_configuration_options({
635+
'user_defined_functions_enabled': True,
636+
'scripted_user_defined_functions_enabled': True,
637+
'materialized_views_enabled': True,
638+
'sasi_indexes_enabled': True,
639+
'transient_replication_enabled': True,
640+
})
641+
elif Version(cassandra_version) >= Version('2.2'):
642+
CCM_CLUSTER.set_configuration_options({'user_defined_functions_enabled': True})
635643
if Version(cassandra_version) >= Version('3.0'):
636644
CCM_CLUSTER.set_configuration_options({'enable_scripted_user_defined_functions': True})
637645
if Version(cassandra_version) >= Version('4.0-a'):

0 commit comments

Comments
 (0)