Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346307
D2605.id9316.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D2605.id9316.diff
View Options
diff --git a/swh/journal/tests/test_cli.py b/swh/journal/tests/test_cli.py
--- a/swh/journal/tests/test_cli.py
+++ b/swh/journal/tests/test_cli.py
@@ -16,7 +16,7 @@
import pytest
from swh.objstorage.backends.in_memory import InMemoryObjStorage
-from swh.storage.in_memory import Storage
+from swh.storage.in_memory import InMemoryStorage
from swh.journal.cli import cli
from swh.journal.serializers import key_to_kafka, value_to_kafka
@@ -42,9 +42,9 @@
@pytest.fixture
def storage():
- """An instance of swh.storage.in_memory.Storage that gets injected
+ """An instance of swh.storage.in_memory.InMemoryStorage that gets injected
into the CLI functions."""
- storage = Storage()
+ storage = InMemoryStorage()
with patch('swh.journal.cli.get_storage') as get_storage_mock:
get_storage_mock.return_value = storage
yield storage
@@ -64,7 +64,7 @@
def test_replay(
- storage: Storage,
+ storage: InMemoryStorage,
kafka_prefix: str,
kafka_server: Tuple[Popen, int]):
(_, port) = kafka_server
@@ -154,7 +154,7 @@
@_patch_objstorages(['src', 'dst'])
def test_replay_content(
objstorages,
- storage: Storage,
+ storage: InMemoryStorage,
kafka_prefix: str,
kafka_server: Tuple[Popen, int]):
(_, kafka_port) = kafka_server
@@ -182,7 +182,7 @@
@_patch_objstorages(['src', 'dst'])
def test_replay_content_exclude(
objstorages,
- storage: Storage,
+ storage: InMemoryStorage,
kafka_prefix: str,
kafka_server: Tuple[Popen, int]):
(_, kafka_port) = kafka_server
diff --git a/swh/journal/tests/test_write_replay.py b/swh/journal/tests/test_write_replay.py
--- a/swh/journal/tests/test_write_replay.py
+++ b/swh/journal/tests/test_write_replay.py
@@ -10,7 +10,7 @@
from hypothesis.strategies import lists
from swh.model.hypothesis_strategies import object_dicts
-from swh.storage.in_memory import Storage
+from swh.storage.in_memory import InMemoryStorage
from swh.storage import HashCollision
from swh.journal.replay import process_replay_objects
@@ -51,7 +51,7 @@
queue = []
replayer = MockedJournalClient(queue)
- storage1 = Storage()
+ storage1 = InMemoryStorage()
storage1.journal_writer = MockedKafkaWriter(queue)
for (obj_type, obj) in objects:
@@ -70,7 +70,7 @@
assert replayer.max_messages == 0
replayer.max_messages = queue_size
- storage2 = Storage()
+ storage2 = InMemoryStorage()
worker_fn = functools.partial(process_replay_objects, storage=storage2)
nb_messages = 0
while nb_messages < queue_size:
@@ -108,7 +108,7 @@
queue = []
replayer = MockedJournalClient(queue)
- storage1 = Storage()
+ storage1 = InMemoryStorage()
storage1.journal_writer = MockedKafkaWriter(queue)
contents = []
@@ -124,7 +124,7 @@
assert replayer.max_messages == 0
replayer.max_messages = queue_size
- storage2 = Storage()
+ storage2 = InMemoryStorage()
worker_fn = functools.partial(process_replay_objects_content,
src=storage1.objstorage,
dst=storage2.objstorage)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:53 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213931
Attached To
D2605: Fix tests; swh.storage.in_memory.Storage was renamed to InMemoryStorage
Event Timeline
Log In to Comment