From dda606ce96b05304b7147d3f366e1bee010b9e9a Mon Sep 17 00:00:00 2001 From: vsedmik <46570670+vsedmik@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:00:56 +0100 Subject: [PATCH] Wait for product HTTP Proxy update to finish (#14269) (cherry picked from commit 9012e2f927e0664b67bcbd0b12756de4c438811b) --- tests/foreman/cli/test_http_proxy.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/foreman/cli/test_http_proxy.py b/tests/foreman/cli/test_http_proxy.py index fc0028eed78..68ea95559ca 100644 --- a/tests/foreman/cli/test_http_proxy.py +++ b/tests/foreman/cli/test_http_proxy.py @@ -272,6 +272,13 @@ def test_positive_assign_http_proxy_to_products(module_org, module_target_sat): } ) assert 'Product proxy updated' in res + module_target_sat.wait_for_tasks( + search_query=( + f'Actions::Katello::Repository::Update and organization_id = {module_org.id}' + ), + max_tries=5, + poll_rate=10, + ) for repo in repo_a1, repo_a2, repo_b1, repo_b2: result = module_target_sat.cli.Repository.info({'id': repo['id']}) assert result['http-proxy']['http-proxy-policy'] == 'use_selected_http_proxy' @@ -293,6 +300,13 @@ def test_positive_assign_http_proxy_to_products(module_org, module_target_sat): {'ids': f"{product_a['id']},{product_b['id']}", 'http-proxy-policy': 'none'} ) assert 'Product proxy updated' in res + module_target_sat.wait_for_tasks( + search_query=( + f'Actions::Katello::Repository::Update and organization_id = {module_org.id}' + ), + max_tries=5, + poll_rate=10, + ) for repo in repo_a1, repo_a2, repo_b1, repo_b2: result = module_target_sat.cli.Repository.info({'id': repo['id']}) assert result['http-proxy']['http-proxy-policy'] == 'none'