Skip to content

Commit

Permalink
workaround
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
chr-stian committed Mar 5, 2024
1 parent 02c5ea1 commit ce04f98
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions galaxy_ng/tests/integration/utils/pulp_interfaces.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

from galaxy_ng.tests.integration.utils import (
wait_for_task, wait_for_all_tasks
)
Expand Down Expand Up @@ -49,11 +51,31 @@ def __init__(self, client, name, repo_body=None, distro_body=None):
self.create()

def create(self):
'''
self._repo = self.client(
f"{self.api_prefix}pulp/api/v3/repositories/ansible/ansible/",
args=self._repo_body,
method="POST"
)
'''
# FIXME - the POST call will often result in an error with the oci+insights profile ...
_repo = None
retries = 10
for x in range(0, retries):
try:
_repo = self.client(
f"{self.api_prefix}pulp/api/v3/repositories/ansible/ansible/",
args=self._repo_body,
method="POST"
)
break
except Exception as e:
print(e)
time.sleep(5)

if _repo is None:
raise Exception("failed to create repo and dist")
self._repo = _repo

resp = self.client(
f"{self.api_prefix}pulp/api/v3/distributions/ansible/ansible/",
Expand Down

0 comments on commit ce04f98

Please sign in to comment.