File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
pulp_container/tests/functional/api Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1- import time
21import subprocess
32import pytest
43
@@ -53,6 +52,8 @@ def pull_and_verify(
5352 registry_client ,
5453 local_registry ,
5554 full_path ,
55+ pulpcore_bindings ,
56+ monitor_task ,
5657):
5758 def _pull_and_verify (images , pull_through_distribution ):
5859 tags_to_verify = []
@@ -98,15 +99,14 @@ def _pull_and_verify(images, pull_through_distribution):
9899 check_manifest_arch_os_size (manifest )
99100
100101 # 3. check if the repository version has changed
101- for _ in range (5 ):
102- repository = container_repository_api .list (name = path ).results [0 ]
103- if f"{ repository .pulp_href } versions/{ version } /" == repository .latest_version_href :
104- break
105-
106- # there might be still the saving process running in the background
107- time .sleep (1 )
108- else :
109- assert False , "The repository was not updated with the cached content."
102+ repository = container_repository_api .list (name = path ).results [0 ]
103+ task = pulpcore_bindings .TasksApi .list (
104+ reserved_resources = repository .prn ,
105+ name = "pulp_container.app.tasks.download_image_data.download_image_data" ,
106+ ).results [0 ]
107+ monitor_task (task .pulp_href )
108+ repository = container_repository_api .read (repository .pulp_href )
109+ assert f"{ repository .pulp_href } versions/{ version } /" == repository .latest_version_href
110110
111111 # 4. test if pulling the same content twice does not raise any error
112112 local_registry .pull (local_image_pull_path )
You can’t perform that action at this time.
0 commit comments