Skip to content

Commit 29b2021

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 1316cd1 commit 29b2021

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

.github/workflows/integration-tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,24 @@ jobs:
3737
- uses: actions/setup-python@v5
3838
name: Install Python ${{ matrix.python-version }}
3939
with:
40+
default: 2.7.14
4041
python-version: ${{ matrix.python-version }}
4142
allow-prereleases: true
4243

43-
- name: Test with pytest
44+
- name: Test with scylla
4445
run: |
4546
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
4647
export SCYLLA_VERSION='release:6.2'
4748
./scripts/run_integration_test.sh tests/integration/standard/ tests/integration/cqlengine/
4849
49-
- name: Test tablets
50+
- name: Test with scylla - tablets
5051
run: |
5152
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
5253
export SCYLLA_VERSION='release:6.2'
5354
./scripts/run_integration_test.sh tests/integration/experiments/
55+
56+
- name: Test with cassandra
57+
run: |
58+
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
59+
export CASSANDRA_VERSION='4.1.5'
60+
./scripts/run_integration_test.sh tests/integration/standard/

scripts/run_integration_test.sh

Lines changed: 13 additions & 5 deletions
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 $*
40-

tests/integration/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,16 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
629629
else:
630630
CCM_CLUSTER = CCMCluster(path, cluster_name, **ccm_options)
631631
CCM_CLUSTER.set_configuration_options({'start_native_transport': True})
632-
if Version(cassandra_version) >= Version('2.2'):
633-
CCM_CLUSTER.set_configuration_options({'enable_user_defined_functions': True})
632+
if Version(cassandra_version) >= Version('4.1'):
633+
CCM_CLUSTER.set_configuration_options({
634+
'user_defined_functions_enabled': True,
635+
'scripted_user_defined_functions_enabled': True,
636+
'materialized_views_enabled': True,
637+
'sasi_indexes_enabled': True,
638+
'transient_replication_enabled': True,
639+
})
640+
elif Version(cassandra_version) >= Version('2.2'):
641+
CCM_CLUSTER.set_configuration_options({'user_defined_functions_enabled': True})
634642
if Version(cassandra_version) >= Version('3.0'):
635643
CCM_CLUSTER.set_configuration_options({'enable_scripted_user_defined_functions': True})
636644
if Version(cassandra_version) >= Version('4.0-a'):

0 commit comments

Comments
 (0)