Compare commits

...

10 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
c370dd682e Add space after comma in list for Python style consistency
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-31 13:29:24 +00:00
copilot-swe-agent[bot]
fed74d44fb Add Scylla-specific variants of snapshot validation tests
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-31 13:27:50 +00:00
copilot-swe-agent[bot]
6f71a34a06 Mark tests as cassandra_only - Scylla doesn't enforce these validations
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-31 12:45:57 +00:00
copilot-swe-agent[bot]
6dcf1dc94f Replace implicit string concatenation with explicit strings for clarity
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-31 07:06:51 +00:00
copilot-swe-agent[bot]
534f1011b7 Revert incorrect typo fix - restore original Cassandra 3.11 error messages
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-30 21:02:34 +00:00
copilot-swe-agent[bot]
763843470e Revert incorrect comma additions - restore implicit string concatenation
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-30 12:31:16 +00:00
copilot-swe-agent[bot]
b9ff9b0817 Fix implicit string concatenation in test_snapshot_keyspace_with_ktlist
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-30 12:09:07 +00:00
Yaniv Kaul
8da166b971 Potential fix for pull request finding 'Implicit string concatenation in a list'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2025-12-15 12:51:47 +02:00
copilot-swe-agent[bot]
af18b0ef2a Fix typos and formatting in test_snapshot.py
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-14 16:03:33 +00:00
copilot-swe-agent[bot]
4497a941d1 Initial plan 2025-12-14 15:59:52 +00:00

View File

@@ -105,7 +105,7 @@ def check_snapshot_out(res, tag, ktlist, skip_flush):
if len(ktlist) == 0:
keyspaces = "all keyspaces"
else:
keyspaces = ", ?".join(ktlist)
keyspaces = ", ".join(ktlist)
pattern = re.compile("Requested creating snapshot\\(s\\)"
f" for \\[{keyspaces}\\]"
@@ -216,7 +216,7 @@ def test_snapshot_ktlist(nodetool, option_name):
expected_request("POST", "/storage_service/snapshots",
params={"tag": tag, "sf": "false", "kn": "ks1,ks2"})
])
check_snapshot_out(res.stdout, tag, ["ks1" ,"ks2"], False)
check_snapshot_out(res.stdout, tag, ["ks1", "ks2"], False)
@pytest.mark.parametrize("tag", [None, "my_snapshot_tag"])
@@ -286,26 +286,38 @@ def test_snapshot_multiple_keyspace_with_table(nodetool):
" you must specify one and only one keyspace"])
def test_snapshot_table_with_ktlist(nodetool):
def test_snapshot_table_with_ktlist(nodetool, cassandra_only):
check_nodetool_fails_with(
nodetool,
("snapshot", "--table", "tbl1", "-kt", "ks1.tbl1"),
{"expected_requests": []},
["error: When specifying the Keyspace columfamily list for a snapshot,"
" you should not specify columnfamily",
"error processing arguments: when specifying the keyspace-table list for a snapshot,"
" you should not specify table(s)"])
["error: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily",
"error processing arguments: when specifying the keyspace-table list for a snapshot, you should not specify table(s)"])
def test_snapshot_keyspace_with_ktlist(nodetool):
def test_snapshot_keyspace_with_ktlist(nodetool, cassandra_only):
check_nodetool_fails_with(
nodetool,
("snapshot", "-kt", "ks1.tbl1", "ks1"),
{"expected_requests": []},
["error: When specifying the Keyspace columfamily list for a snapshot,"
" you should not specify columnfamily",
"error processing arguments: when specifying the keyspace-table list for a snapshot,"
" you should not specify keyspace(s)"])
["error: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily",
"error processing arguments: when specifying the keyspace-table list for a snapshot, you should not specify keyspace(s)"])
def test_snapshot_table_with_ktlist_scylla(nodetool, scylla_only):
check_nodetool_fails_with(
nodetool,
("snapshot", "--table", "tbl1", "-kt", "ks1.tbl1"),
{"expected_requests": []},
["error processing arguments: when specifying the keyspace-table list for a snapshot, you should not specify table(s)"])
def test_snapshot_keyspace_with_ktlist_scylla(nodetool, scylla_only):
check_nodetool_fails_with(
nodetool,
("snapshot", "-kt", "ks1.tbl1", "ks1"),
{"expected_requests": []},
["error processing arguments: when specifying the keyspace-table list for a snapshot, you should not specify keyspace(s)"])
def test_snapshot_keyspace_with_tables(nodetool, scylla_only):