Skip to content

Commit

Permalink
Try waiting longer for community collection tests. (#2110)
Browse files Browse the repository at this point in the history
background tasks for namespace and collection creation can take a while to settle.

No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner authored Mar 30, 2024
1 parent c6cb9ac commit 2ff8e3b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions galaxy_ng/tests/integration/community/test_community_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import pytest
import subprocess
import time

from ansible.errors import AnsibleError

Expand Down Expand Up @@ -276,9 +277,13 @@ def test_social_auth_delete_collection(ansible_config):
token=client.get_hub_token(),
)

exists_resp = client.get(
f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/"
)
for x in range(0, 20):
exists_resp = client.get(
f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/"
)
if exists_resp.status_code == 200:
break
time.sleep(5)
assert exists_resp.status_code == 200

del_resp = client.delete(
Expand Down Expand Up @@ -329,9 +334,13 @@ def test_social_auth_deprecate_collection(ansible_config):
token=client.get_hub_token(),
)

exists_resp = client.get(
f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/"
)
for x in range(0, 20):
exists_resp = client.get(
f"v3/plugin/ansible/content/published/collections/index/{namespace}/{name}/"
)
if exists_resp.status_code == 200:
break
time.sleep(5)
assert exists_resp.status_code == 200

dep_resp = client.patch(
Expand Down

0 comments on commit 2ff8e3b

Please sign in to comment.