1111
1212@patch ('iib.workers.tasks.containerized_utils.get_worker_config' )
1313@patch ('iib.workers.tasks.containerized_utils.log' )
14- @patch ('iib.workers.tasks.oras_utils .refresh_indexdb_cache_for_image' )
15- @patch ('iib.workers.tasks.oras_utils .verify_indexdb_cache_for_image' )
16- @patch ('iib.workers.tasks.oras_utils .get_indexdb_artifact_pullspec' )
17- @patch ('iib.workers.tasks.oras_utils .get_imagestream_artifact_pullspec' )
18- @patch ('iib.workers.tasks.oras_utils .get_oras_artifact' )
14+ @patch ('iib.workers.tasks.containerized_utils .refresh_indexdb_cache_for_image' )
15+ @patch ('iib.workers.tasks.containerized_utils .verify_indexdb_cache_for_image' )
16+ @patch ('iib.workers.tasks.containerized_utils .get_indexdb_artifact_pullspec' )
17+ @patch ('iib.workers.tasks.containerized_utils .get_imagestream_artifact_pullspec' )
18+ @patch ('iib.workers.tasks.containerized_utils .get_oras_artifact' )
1919def test_pull_index_db_artifact_imagestream_enabled_cache_synced (
2020 mock_get_oras_artifact ,
2121 mock_get_imagestream_artifact_pullspec ,
@@ -51,11 +51,11 @@ def test_pull_index_db_artifact_imagestream_enabled_cache_synced(
5151
5252@patch ('iib.workers.tasks.containerized_utils.get_worker_config' )
5353@patch ('iib.workers.tasks.containerized_utils.log' )
54- @patch ('iib.workers.tasks.oras_utils .refresh_indexdb_cache_for_image' )
55- @patch ('iib.workers.tasks.oras_utils .verify_indexdb_cache_for_image' )
56- @patch ('iib.workers.tasks.oras_utils .get_indexdb_artifact_pullspec' )
57- @patch ('iib.workers.tasks.oras_utils .get_imagestream_artifact_pullspec' )
58- @patch ('iib.workers.tasks.oras_utils .get_oras_artifact' )
54+ @patch ('iib.workers.tasks.containerized_utils .refresh_indexdb_cache_for_image' )
55+ @patch ('iib.workers.tasks.containerized_utils .verify_indexdb_cache_for_image' )
56+ @patch ('iib.workers.tasks.containerized_utils .get_indexdb_artifact_pullspec' )
57+ @patch ('iib.workers.tasks.containerized_utils .get_imagestream_artifact_pullspec' )
58+ @patch ('iib.workers.tasks.containerized_utils .get_oras_artifact' )
5959def test_pull_index_db_artifact_imagestream_enabled_cache_not_synced (
6060 mock_get_oras_artifact ,
6161 mock_get_imagestream_artifact_pullspec ,
@@ -91,11 +91,11 @@ def test_pull_index_db_artifact_imagestream_enabled_cache_not_synced(
9191
9292@patch ('iib.workers.tasks.containerized_utils.get_worker_config' )
9393@patch ('iib.workers.tasks.containerized_utils.log' )
94- @patch ('iib.workers.tasks.oras_utils .refresh_indexdb_cache_for_image' )
95- @patch ('iib.workers.tasks.oras_utils .verify_indexdb_cache_for_image' )
96- @patch ('iib.workers.tasks.oras_utils .get_indexdb_artifact_pullspec' )
97- @patch ('iib.workers.tasks.oras_utils .get_imagestream_artifact_pullspec' )
98- @patch ('iib.workers.tasks.oras_utils .get_oras_artifact' )
94+ @patch ('iib.workers.tasks.containerized_utils .refresh_indexdb_cache_for_image' )
95+ @patch ('iib.workers.tasks.containerized_utils .verify_indexdb_cache_for_image' )
96+ @patch ('iib.workers.tasks.containerized_utils .get_indexdb_artifact_pullspec' )
97+ @patch ('iib.workers.tasks.containerized_utils .get_imagestream_artifact_pullspec' )
98+ @patch ('iib.workers.tasks.containerized_utils .get_oras_artifact' )
9999def test_pull_index_db_artifact_imagestream_disabled (
100100 mock_get_oras_artifact ,
101101 mock_get_imagestream_artifact_pullspec ,
@@ -130,8 +130,8 @@ def test_pull_index_db_artifact_imagestream_disabled(
130130
131131
132132@patch ('iib.workers.tasks.containerized_utils.get_worker_config' )
133- @patch ('iib.workers.tasks.oras_utils .get_indexdb_artifact_pullspec' )
134- @patch ('iib.workers.tasks.oras_utils .get_oras_artifact' )
133+ @patch ('iib.workers.tasks.containerized_utils .get_indexdb_artifact_pullspec' )
134+ @patch ('iib.workers.tasks.containerized_utils .get_oras_artifact' )
135135def test_pull_index_db_artifact_default_config_behaves_as_disabled (
136136 mock_get_oras_artifact ,
137137 mock_get_indexdb_artifact_pullspec ,
@@ -336,8 +336,8 @@ def test_cleanup_on_failure_no_mr_no_commit(mock_log):
336336 )
337337
338338
339- @patch ('iib.workers.tasks.utils .run_cmd' )
340- @patch ('iib.workers.tasks.oras_utils .get_indexdb_artifact_pullspec' )
339+ @patch ('iib.workers.tasks.containerized_utils .run_cmd' )
340+ @patch ('iib.workers.tasks.containerized_utils .get_indexdb_artifact_pullspec' )
341341@patch ('iib.workers.tasks.containerized_utils.log' )
342342def test_cleanup_on_failure_restores_index_db_artifact (
343343 mock_log , mock_get_indexdb_artifact_pullspec , mock_run_cmd
@@ -350,7 +350,7 @@ def test_cleanup_on_failure_restores_index_db_artifact(
350350 request_id = 1
351351 from_index = 'quay.io/ns/index:v4.19'
352352 index_repo_map = {}
353- original_digest = 'sha256:deadbeef '
353+ original_digest = 'sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef '
354354
355355 v4x_artifact_ref = 'quay.io/ns/index-indexdb:v4.19'
356356 mock_get_indexdb_artifact_pullspec .return_value = v4x_artifact_ref
@@ -383,7 +383,7 @@ def test_cleanup_on_failure_restores_index_db_artifact(
383383 mock_log .info .assert_any_call ("Successfully restored index.db artifact to original digest" )
384384
385385
386- @patch ('iib.workers.tasks.utils .run_cmd' )
386+ @patch ('iib.workers.tasks.containerized_utils .run_cmd' )
387387@patch ('iib.workers.tasks.oras_utils.get_indexdb_artifact_pullspec' )
388388@patch ('iib.workers.tasks.containerized_utils.log' )
389389def test_cleanup_on_failure_restore_failure_is_logged (
@@ -401,7 +401,7 @@ def test_cleanup_on_failure_restore_failure_is_logged(
401401 request_id = 1 ,
402402 from_index = 'quay.io/ns/index:v4.19' ,
403403 index_repo_map = {},
404- original_index_db_digest = 'sha256:deadbeef ' ,
404+ original_index_db_digest = 'sha256:0123456789abcdef0123456789abcdef0123456789abcde ' ,
405405 )
406406
407407 mock_run_cmd .assert_called_once ()
0 commit comments