Skip to content

Commit 0faab66

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 059e10e commit 0faab66

File tree

3 files changed

+32
-10
lines changed

3 files changed

+32
-10
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='release:6.0.2'
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

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

3232
# download version
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+
export MAPPED_CASSANDRA_VERSION=$CASSANDRA_VERSION
43+
unset SCYLLA_VERSION
44+
fi
3345

34-
ccm create scylla-driver-temp -n 1 --scylla --version ${SCYLLA_VERSION}
35-
ccm remove
36-
46+
env
3747
# run test
38-
3948
PROTOCOL_VERSION=4 pytest -rf --import-mode append $*
40-

tests/integration/__init__.py

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

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

9292
cass_version = _tuple_version(row.release_version)
9393
cql_version = _tuple_version(row.cql_version)
@@ -625,8 +625,16 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
625625
else:
626626
CCM_CLUSTER = CCMCluster(path, cluster_name, **ccm_options)
627627
CCM_CLUSTER.set_configuration_options({'start_native_transport': True})
628-
if Version(cassandra_version) >= Version('2.2'):
629-
CCM_CLUSTER.set_configuration_options({'enable_user_defined_functions': True})
628+
if Version(cassandra_version) >= Version('4.1'):
629+
CCM_CLUSTER.set_configuration_options({
630+
'user_defined_functions_enabled': True,
631+
'scripted_user_defined_functions_enabled': True,
632+
'materialized_views_enabled': True,
633+
'sasi_indexes_enabled': True,
634+
'transient_replication_enabled': True,
635+
})
636+
elif Version(cassandra_version) >= Version('2.2'):
637+
CCM_CLUSTER.set_configuration_options({'user_defined_functions_enabled': True})
630638
if Version(cassandra_version) >= Version('3.0'):
631639
CCM_CLUSTER.set_configuration_options({'enable_scripted_user_defined_functions': True})
632640
if Version(cassandra_version) >= Version('4.0-a'):

0 commit comments

Comments
 (0)