Skip to content

Commit

Permalink
fix(review)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Nov 17, 2023
1 parent 3ad745e commit 5dc8b94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ def pdc_archiving_dir(tmp_flow_cells_directory: Path) -> Path:


@pytest.fixture
def pdc_archiving_directories(pdc_archiving_dir: Path) -> PDCArchivingDirectory:
def pdc_archiving_directory(pdc_archiving_dir: Path) -> PDCArchivingDirectory:
"""Returns different PDC archiving directories."""
return PDCArchivingDirectory(
current=f"/{pdc_archiving_dir.as_posix()}/", nas="/ENCRYPT/", pre_nas="/OLD_ENCRYPT/"
Expand Down Expand Up @@ -2208,7 +2208,7 @@ def context_config(
flow_cells_dir: Path,
demultiplexed_runs: Path,
downsample_dir: Path,
pdc_archiving_directories: PDCArchivingDirectory,
pdc_archiving_directory: PDCArchivingDirectory,
) -> dict:
"""Return a context config."""
return {
Expand All @@ -2227,7 +2227,7 @@ def context_config(
"madeline_exe": "echo",
"pon_path": str(cg_dir),
"backup": {
"pdc_archiving_directory": pdc_archiving_directories.dict(),
"pdc_archiving_directory": pdc_archiving_directory.dict(),
"slurm_flow_cell_encryption": {
"account": "development",
"hours": 1,
Expand Down Expand Up @@ -2282,7 +2282,7 @@ def context_config(
},
"encryption": {
"binary_path": "bin/gpg",
"encryption_dir": pdc_archiving_directories.current,
"encryption_dir": pdc_archiving_directory.current,
},
"external": {
"caesar": "server.name.se:/path/%s/on/caesar",
Expand Down
8 changes: 4 additions & 4 deletions tests/meta/backup/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def dsmc_q_archive_output() -> list[str]:


@pytest.fixture()
def archived_flow_cells(pdc_archiving_directories: PDCArchivingDirectory) -> list[str]:
def archived_flow_cells(pdc_archiving_directory: PDCArchivingDirectory) -> list[str]:
"""Returns a list of archived flow cells."""
return [
f"{pdc_archiving_directories.current}/new_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
f"{pdc_archiving_directories.nas}/old_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
f"{pdc_archiving_directories.pre_nas}/ancient_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
f"{pdc_archiving_directory.current}/new_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
f"{pdc_archiving_directory.nas}/old_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
f"{pdc_archiving_directory.pre_nas}/ancient_flow_cell{FileExtensions.TAR}{FileExtensions.GZIP}{FileExtensions.GPG}",
]


Expand Down
4 changes: 2 additions & 2 deletions tests/meta/backup/test_meta_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def test_query_pdc_for_flow_cell(
caplog,
flow_cell_name: str,
mock_pdc_query_method: Callable,
pdc_archiving_directories: PDCArchivingDirectory,
pdc_archiving_directory: PDCArchivingDirectory,
):
"""Tests query PDC for a flow cell with a mock PDC query."""
caplog.set_level(logging.DEBUG)

# GIVEN a Backup API
backup_api = BackupAPI(
encryption_api=mock.Mock(),
pdc_archiving_directory=pdc_archiving_directories,
pdc_archiving_directory=pdc_archiving_directory,
status=mock.Mock(),
tar_api=mock.Mock(),
pdc_api=mock.Mock(),
Expand Down

0 comments on commit 5dc8b94

Please sign in to comment.