Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9345448
D3439.id12191.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3439.id12191.diff
View Options
diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,4 +1,4 @@
swh.storage <= 0.9.3
swh.model < 0.4.0
swh.scheduler >= 0.0.39
-swh.loader.core < 0.5.2
+swh.loader.core >= 0.5.2
diff --git a/swh/loader/svn/tests/test_loader.py b/swh/loader/svn/tests/test_loader.py
--- a/swh/loader/svn/tests/test_loader.py
+++ b/swh/loader/svn/tests/test_loader.py
@@ -4,12 +4,14 @@
# See top-level LICENSE file for more information
import os
-import subprocess
-from typing import Optional
-from swh.loader.tests.common import assert_last_visit_matches
-from swh.loader.package.tests.common import check_snapshot, get_stats
+from swh.loader.tests import (
+ assert_last_visit_matches,
+ check_snapshot,
+ prepare_repository_from_archive,
+ get_stats,
+)
from swh.loader.svn.loader import (
DEFAULT_BRANCH,
@@ -56,17 +58,6 @@
PYANG_SNAPSHOT = hashutil.hash_to_bytes("6d9590de11b00a5801de0ff3297c5b44bbbf7d24")
-def prepare_repository_from_archive(
- archive_path: str, filename: Optional[str] = None, tmp_path: str = "/tmp"
-) -> str:
- # uncompress folder/repositories/dump for the loader to ingest
- subprocess.check_output(["tar", "xf", archive_path, "-C", tmp_path])
- # build the origin url (or some derivative form)
- _fname = filename if filename else os.path.basename(archive_path)
- repo_url = f"file://{tmp_path}/{_fname}"
- return repo_url
-
-
def test_loader_svn_new_visit(swh_config, datadir, tmp_path):
"""Eventful visit should yield 1 snapshot"""
archive_name = "pkg-gourmet"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:21 PM (5 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217102
Attached To
D3439: loader.svn.tests: Reuse helper function from swh.loader.core
Event Timeline
Log In to Comment