Skip to content

Commit

Permalink
Fixed tests that break in domain-enabled environments.
Browse files Browse the repository at this point in the history
fixes pulp#692.
  • Loading branch information
ggainey committed May 18, 2023
1 parent 82d9ba7 commit 7005e51
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES/692.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed some tests that made assumptions that worked, but were nonetheless incorrect.

2 changes: 1 addition & 1 deletion tests/scripts/pulp_file/test_acs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test "$(echo "$OUTPUT" | jq ".paths | length")" -eq 2

# test refresh
expect_succ pulp --background file acs refresh --acs $acs
task_group=$(echo "$ERROUTPUT" | grep -E -o "${PULP_API_ROOT}([-_a-zA-Z0-9]+/)?api/v3/task-groups/[-[:xdigit:]]*/")
task_group=$(echo "$ERROUTPUT" | grep -E -o "/.*/api/v3/task-groups/[-[:xdigit:]]*/")
expect_succ pulp task-group show --href "$task_group" --wait

group_task_uuid="${task_group%/}"
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/pulp_file/test_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ expect_succ pulp file remote show --remote "cli_test_file_remote"
HREF="$(echo "$OUTPUT" | jq -r '.pulp_href')"
test "$(echo "$OUTPUT" | jq -r '.proxy_url')" = "http://proxy.org"
test "$(echo "$OUTPUT" | jq -r '.max_retries')" = "5"
test "$(echo "$OUTPUT" | jq -r '.total_timeout')" = "32"
test "$(echo "$OUTPUT" | jq -r '.total_timeout')" = "32.0" # total_timeout is a float
expect_succ pulp file remote update --remote "$HREF" --proxy-url "" --proxy-username "" --proxy-password "" --max-retries "" --total-timeout ""
expect_succ pulp file remote list --name-contains "li_test_file_remot"
test "$(echo "$OUTPUT" | jq -r '.[0].proxy_url')" = "null"
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/pulp_rpm/test_acs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test "$(echo "$OUTPUT" | jq ".paths | length")" -eq 2

# test refresh
expect_succ pulp rpm acs refresh --acs $acs
task_group=$(echo "$ERROUTPUT" | grep -E -o "${PULP_API_ROOT}api/v3/task-groups/[-[:xdigit:]]*/")
task_group=$(echo "$ERROUTPUT" | grep -E -o "/.*/api/v3/task-groups/[-[:xdigit:]]*/")
expect_succ pulp task-group show --href "$task_group"
test "$(echo "$OUTPUT" | jq ".tasks | length")" -eq 2

Expand Down
4 changes: 2 additions & 2 deletions tests/scripts/pulp_rpm/test_rpm_sync_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ PUBLICATION_VER_HREF=$(echo "$OUTPUT" | jq -r .pulp_href)
expect_succ pulp rpm distribution create --name "cli_test_rpm_distro" \
--base-path "cli_test_rpm_distro" \
--publication "$PUBLICATION_HREF"

expect_succ curl "$curl_opt" --head --fail "$PULP_BASE_URL/pulp/content/cli_test_rpm_distro/config.repo"
DISTRIBUTION_BASE_URL=$(echo "$OUTPUT" | jq -r .base_url)
expect_succ curl "$curl_opt" --head --fail "${DISTRIBUTION_BASE_URL}config.repo"

expect_succ pulp rpm repository version list --repository "cli_test_rpm_repository"
expect_succ pulp rpm repository version repair --repository "cli_test_rpm_repository" --version 1
Expand Down

0 comments on commit 7005e51

Please sign in to comment.