Skip to content

Commit

Permalink
update tests to fix failing pipelines (#1921)
Browse files Browse the repository at this point in the history
* update tests to fix failing pipelines
  • Loading branch information
chr-stian authored Oct 6, 2023
1 parent 7f5ba06 commit 61aca11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion galaxy_ng/tests/integration/api/rbac_actions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ansible_config = get_ansible_config()
galaxy_client = get_galaxy_client(ansible_config)
if is_ephemeral_env():
gc_admin = galaxy_client("partner_engineer", basic_token=True)
gc_admin = galaxy_client("admin", basic_token=True)
else:
gc_admin = galaxy_client("admin", basic_token=False)

Expand Down
4 changes: 2 additions & 2 deletions galaxy_ng/tests/integration/api/test_artifact_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ def test_ansible_lint_exception(ansible_config, upload_artifact, hub_version):
log_messages = [item["message"] for item in resp["messages"]]

pattern = "Linting collection via ansible-lint" # hub 4.8, galaxy-importer 0.4.11
if parse_version(hub_version) < parse_version('4.8.0dev'):
pattern = "Linting role .* via ansible-lint" # 4.7, galaxy-importer 0.4.7
if parse_version(hub_version) < parse_version('4.7.0dev'):
pattern = "Linting role .* via ansible-lint" # 4.6, galaxy-importer 0.4.7

linting_re = re.compile(pattern)
linting = [item for item in log_messages if linting_re.match(item)]
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/tests/integration/utils/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def copy_collection_version(client, collection, src_repo_name, dest_repo_name):
# http://.../api/automation-hub/pulp/api/v3/tasks/8be0b9b6-71d6-4214-8427-2ecf81818ed4/
ansible_config = get_ansible_config()
galaxy_client = get_galaxy_client(ansible_config)
gc = galaxy_client("partner_engineer")
gc = galaxy_client("admin")
ds = {"task": f"{gc.galaxy_root}pulp/api/v3/tasks/{task_id}/"}
task_result = wait_for_task(gc, ds, timeout=6000)
assert task_result['state'] == 'completed', task_result
Expand Down

0 comments on commit 61aca11

Please sign in to comment.