Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,29 +687,24 @@ def is_scylla_enterprise(version: Version) -> bool:
return version > Version('2000.1.1')


def xfail_scylla_version_lt(reason, oss_scylla_version, ent_scylla_version, *args, **kwargs):
def xfail_scylla_version_lt(reason, scylla_version, *args, **kwargs):
"""
It is used to mark tests that are going to fail on certain scylla versions.
:param reason: message to fail test with
:param oss_scylla_version: str, oss version from which test supposed to succeed
:param ent_scylla_version: str, enterprise version from which test supposed to succeed
:param scylla_version: str, version from which test supposed to succeed
"""
if not (reason.startswith("scylladb/scylladb#") or reason.startswith("scylladb/scylla-enterprise#")):
raise ValueError('reason should start with scylladb/scylladb#<issue-id> or scylladb/scylla-enterprise#<issue-id> to reference issue in scylla repo')

if not isinstance(ent_scylla_version, str):
raise ValueError('ent_scylla_version should be a str')
if not isinstance(scylla_version, str):
raise ValueError('scylla_version should be a str')

if SCYLLA_VERSION is None:
return pytest.mark.skipif(False, reason="It is just a NoOP Decor, should not skip anything")

current_version = Version(get_scylla_version(SCYLLA_VERSION))

if is_scylla_enterprise(current_version):
return pytest.mark.xfail(current_version < Version(ent_scylla_version),
reason=reason, *args, **kwargs)

return pytest.mark.xfail(current_version < Version(oss_scylla_version), reason=reason, *args, **kwargs)
return pytest.mark.xfail(current_version < Version(scylla_version), reason=reason, *args, **kwargs)


def skip_scylla_version_lt(reason, scylla_version):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_application_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def teardown_module():


@xfail_scylla_version_lt(reason='scylladb/scylla-enterprise#5467 - system.client_options is not yet supported',
oss_scylla_version="7.0", ent_scylla_version="2026.1.0")
scylla_version="2026.1.0")
class ApplicationInfoTest(unittest.TestCase):
attribute_to_startup_key = {
'application_name': 'APPLICATION_NAME',
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_control_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_control_connection_port_discovery(self):
assert 7000 == host.broadcast_port

@xfail_scylla_version_lt(reason='scylladb/scylladb#26992 - system.client_routes is not yet supported',
oss_scylla_version="7.0", ent_scylla_version="2026.1.0")
scylla_version="2026.1.0")
def test_client_routes_change_event(self):
cluster = TestCluster()

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ def test_export_keyspace_schema_udts(self):

@greaterthancass21
@xfail_scylla_version_lt(reason='scylladb/scylladb#10707 - Column name in CREATE INDEX is not quoted',
oss_scylla_version="5.2", ent_scylla_version="2023.1.1")
scylla_version="2023.1.1")
def test_case_sensitivity(self):
"""
Test that names that need to be escaped in CREATE statements are
Expand Down
Loading