CASSANDRA-15835: re-enable running upgrade-dtests for developer-CI runs against a local C* clone
diff --git a/conftest.py b/conftest.py
index 34de30b..c046fd8 100644
--- a/conftest.py
+++ b/conftest.py
@@ -433,14 +433,19 @@
yield dtest_config
+def cassandra_dir_and_version(config):
+ cassandra_dir = config.getoption("--cassandra-dir") or config.getini("cassandra_dir")
+ cassandra_version = config.getoption("--cassandra-version")
+ return cassandra_dir, cassandra_version
+
+
def pytest_collection_modifyitems(items, config):
"""
This function is called upon during the pytest test collection phase and allows for modification
of the test items within the list
"""
collect_only = config.getoption("--collect-only")
- cassandra_dir = config.getoption("--cassandra-dir") or config.getini("cassandra_dir")
- cassandra_version = config.getoption("--cassandra-version")
+ cassandra_dir, cassandra_version = cassandra_dir_and_version(config)
if not collect_only and cassandra_dir is None:
if cassandra_version is None:
raise Exception("Required dtest arguments were missing! You must provide either --cassandra-dir "
diff --git a/upgrade_tests/upgrade_manifest.py b/upgrade_tests/upgrade_manifest.py
index bca6c97..19e4624 100644
--- a/upgrade_tests/upgrade_manifest.py
+++ b/upgrade_tests/upgrade_manifest.py
@@ -3,6 +3,7 @@
from collections import namedtuple
from dtest import RUN_STATIC_UPGRADE_MATRIX
+from conftest import cassandra_dir_and_version
import ccmlib.repository
from ccmlib.common import get_version_from_build
@@ -115,9 +116,10 @@
"""
Returns a new object cloned from this one, with the version replaced with the local env version.
"""
- # todo CASSANDRA-14421
- # return self._replace(version=CASSANDRA_GITREF or CASSANDRA_VERSION_FROM_BUILD)
- return self
+ cassandra_dir, cassandra_version = cassandra_dir_and_version(CONFIG)
+ if cassandra_version:
+ return self._replace(version=cassandra_version)
+ return self._replace(version="clone:{}".format(cassandra_dir))
indev_2_1_x = VersionMeta(name='indev_2_1_x', family='2.1', variant='indev', version='github:apache/cassandra-2.1', min_proto_v=1, max_proto_v=3, java_versions=(7, 8))