Skip to content

Commit

Permalink
Merge pull request #198 from Aiven-Open/aris-fix-pytest-warning
Browse files Browse the repository at this point in the history
Fix pytest warning on test case dataclass
  • Loading branch information
kmichel-aiven authored Mar 28, 2024
2 parents dbf20c9 + 5301d96 commit 3aa93a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/unit/coordinator/plugins/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ async def test_snapshot_release_step(


@dataclasses.dataclass
class TestListDeltasParam:
class ListDeltasParam:
test_id: str
basebackup_manifest: ipc.BackupManifest
stored_jsons: dict[str, bytes]
Expand All @@ -447,13 +447,13 @@ class TestListDeltasParam:
@pytest.mark.parametrize(
"p",
[
TestListDeltasParam(
ListDeltasParam(
test_id="empty_storage",
basebackup_manifest=make_manifest(start="1970-01-01T00:00", end="1970-01-01T00:30"),
stored_jsons={},
expected_deltas=[],
),
TestListDeltasParam(
ListDeltasParam(
test_id="single_delta",
basebackup_manifest=make_manifest(start="1970-01-01T00:00", end="1970-01-01T00:30"),
stored_jsons={
Expand All @@ -462,7 +462,7 @@ class TestListDeltasParam:
},
expected_deltas=["delta-one"],
),
TestListDeltasParam(
ListDeltasParam(
test_id="deltas_older_than_backup_are_not_listed",
basebackup_manifest=make_manifest(start="2000-01-01T00:00", end="2000-01-01T00:30"),
stored_jsons={
Expand All @@ -476,7 +476,7 @@ class TestListDeltasParam:
},
expected_deltas=["delta-one", "delta-two", "delta-three"],
),
TestListDeltasParam(
ListDeltasParam(
test_id="relies_on_start_time_in_case_of_intersections",
basebackup_manifest=make_manifest(start="2000-01-01T00:00", end="2000-01-01T00:30"),
stored_jsons={
Expand All @@ -489,7 +489,7 @@ class TestListDeltasParam:
],
ids=lambda p: p.test_id,
)
async def test_list_delta_backups(p: TestListDeltasParam) -> None:
async def test_list_delta_backups(p: ListDeltasParam) -> None:
async_json_storage = AsyncJsonStorage(MemoryJsonStorage(p.stored_jsons))
step = DeltaManifestsStep(async_json_storage)
cluster = Cluster(nodes=[CoordinatorNode(url="http://node_1")])
Expand Down
1 change: 0 additions & 1 deletion tests/unit/node/test_node_cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Copyright (c) 2021 Aiven Ltd
See LICENSE for details
"""

from astacus.common import ipc
from astacus.common.cassandra.config import SNAPSHOT_NAME
from astacus.common.cassandra.utils import SYSTEM_KEYSPACES
Expand Down

0 comments on commit 3aa93a8

Please sign in to comment.