Skip to content
Snippets Groups Projects
Commit ea12e618 authored by Daniel Lopez-Sanders's avatar Daniel Lopez-Sanders
Browse files

Got a test working for the EVLA EB ingestion artifacts tar

parent 0805c16f
No related branches found
No related tags found
1 merge request!1909No story: ingest_envoy fixes for EVLA SDM ingestion
......@@ -49,6 +49,10 @@ def build_manifest(evla_eb_staging_dir: Path) -> Generator[tuple[IngestionManife
:param evla_eb_staging_dir: the path to the temporary staging directory.
:return: The manifest and the file it came from.
"""
for file in evla_eb_staging_dir.parent.iterdir():
if file.is_file():
file.unlink() # Clear out ingestion artifacts tars for testing
evla_eb_staging_dir.mkdir(parents=True)
evla_eb_sdm_files = [
"Annotation.xml",
......@@ -135,7 +139,7 @@ def test_manifest_ingestion_artifacts_tar_contents(
"""
Tests for the correct contents of the manifest's ingestion artifacts tar.
"""
ingestion_artifacts_tar = find_ingestion_artifacts_tar(evla_eb_staging_dir)
ingestion_artifacts_tar = find_ingestion_artifacts_tar(evla_eb_staging_dir.parent)
with tarfile.open(ingestion_artifacts_tar, "r") as tar:
# We need to get just the file name, not the full path to the file
members = [member.name.split("/")[-1] for member in tar.getmembers()]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment