Skip to content
Snippets Groups Projects
Commit a573b188 authored by Daniel Nemergut's avatar Daniel Nemergut Committed by Charlotte Hausman
Browse files

Removed rawdata from conveyor's tests

parent 06b023d4
No related branches found
No related tags found
1 merge request!1618update vlass templates for pimscache python3.10 upgrade
This commit is part of merge request !1618. Comments created here will be created in the context of that merge request.
......@@ -84,7 +84,7 @@ class TestDeliveryConveyor:
@patch("os.chown")
@patch("os.makedirs")
def test_move_subdirectories_to_qa_area(self, mock_dirs, mock_chown, mock_chmod, mock_move, mock_system, mock_link):
with patch("glob.glob", MagicMock(return_value=["rawdata/", "working/", "products/"])) as contents:
with patch("glob.glob", MagicMock(return_value=["working/", "products/"])) as contents:
path = "/lustre/aoc/cluster/pipeline/docker/workspaces/qa2/tmpabcd1234"
conveyor.move_subdirectories_to_qa_area(path)
assert mock_dirs.call_count == 1
......
......@@ -36,7 +36,6 @@ settings = {
action = "Calibration Retrieval"
PRODUCTS = "products/"
RAWDATA = "rawdata/"
WORKING = "working/"
conveyor = RetrievalConveyor(settings=settings, action=action)
......@@ -71,7 +70,7 @@ class TestRetrievalConveyor:
@patch("pathlib.Path.unlink")
def test_break_symlinks(self, mock_unlink, mock_sym):
path = fake_determine_spool()
dir_list = [WORKING, RAWDATA, PRODUCTS]
dir_list = [WORKING, PRODUCTS]
conveyor.break_symlinks(path, dir_list)
assert mock_sym.call_count == 3
assert mock_unlink.call_count == 3
......@@ -80,7 +79,7 @@ class TestRetrievalConveyor:
def test_move_subdirectories_to_spool(self, mock_move):
qa_path = fake_determine_qa()
spool_path = fake_determine_spool()
dir_list = [WORKING, RAWDATA, PRODUCTS]
dir_list = [WORKING, PRODUCTS]
conveyor.move_subdirectories_to_spool(qa_path, spool_path, dir_list)
assert mock_move.call_count == 3
......@@ -92,11 +91,11 @@ class TestRetrievalConveyor:
path = conveyor.determine_spool_directory()
assert isinstance(path, Path)
@patch("glob.glob", return_value=[WORKING, RAWDATA, PRODUCTS])
@patch("glob.glob", return_value=[WORKING, PRODUCTS])
@patch("os.chdir")
def test_check_spool_contents(self, mock_chdir, mock_glob):
spool = fake_determine_spool()
expected_list = [WORKING, RAWDATA, PRODUCTS]
expected_list = [WORKING, PRODUCTS]
check = conveyor.check_spool_contents(spool, expected_list)
assert check is True
......
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