From 9c90863e347be23fd41d26223698298531393984 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Fri, 16 Aug 2024 09:30:37 -0400 Subject: [PATCH] Make MAPPED_SCYLLA_VERSION a soft requirement It is going to ease development and test process. From now on if you want to run it on release you can just run it as such: SCYLLA_VERSION="6.0.2" pytest .... --- ci/run_integration_test.sh | 1 - tests/integration/__init__.py | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ci/run_integration_test.sh b/ci/run_integration_test.sh index 2796a33e61..a625a8eca2 100755 --- a/ci/run_integration_test.sh +++ b/ci/run_integration_test.sh @@ -36,6 +36,5 @@ ccm remove # run test -export MAPPED_SCYLLA_VERSION=3.11.4 PROTOCOL_VERSION=4 pytest -rf --import-mode append $* diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 9928dfb7e2..e4b074a153 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -180,15 +180,26 @@ def _get_dse_version_from_cass(cass_version): # Supported Clusters: Cassandra, DDAC, DSE, Scylla DSE_VERSION = None SCYLLA_VERSION = os.getenv('SCYLLA_VERSION', None) +SCYLLA_SOURCE = SCYLLA_VERSION if os.getenv('DSE_VERSION', None): # we are testing against DSE DSE_VERSION = Version(os.getenv('DSE_VERSION', None)) DSE_CRED = os.getenv('DSE_CREDS', None) CASSANDRA_VERSION = _get_cass_version_from_dse(DSE_VERSION.base_version) CCM_VERSION = DSE_VERSION.base_version -else: # we are testing against Cassandra or DDAC +else: # we are testing against Cassandra,DDAC or Scylla if SCYLLA_VERSION: - cv_string = SCYLLA_VERSION - mcv_string = os.getenv('MAPPED_SCYLLA_VERSION', None) + if SCYLLA_VERSION.count("/"): + # SCYLLA_VERSION="unstable/master/....." + mcv_string = cv_string = os.getenv('MAPPED_SCYLLA_VERSION', None) + elif SCYLLA_VERSION.count(":"): + # SCYLLA_VERSION="release:6.0.2" + cv_string = SCYLLA_VERSION.split(":")[1] + mcv_string = os.getenv('MAPPED_SCYLLA_VERSION', cv_string) + else: + # SCYLLA_VERSION="6.0.2" + cv_string = SCYLLA_VERSION + mcv_string = os.getenv('MAPPED_SCYLLA_VERSION', cv_string) + SCYLLA_VERSION=f"release:{SCYLLA_VERSION}" else: cv_string = os.getenv('CASSANDRA_VERSION', None) mcv_string = os.getenv('MAPPED_CASSANDRA_VERSION', None)