Skip to content

Commit

Permalink
Checks if the list of repositories is sorted in reverse alphabetical …
Browse files Browse the repository at this point in the history
…order

Instead of comparing a list of repositories, just checks if the list is in
a reverse alphabetical order.

fixes: pulp#569
  • Loading branch information
dkliban committed Oct 13, 2022
1 parent 579fe77 commit c252c19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/569.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the ordering test to work with pulpcore 3.16 and 3.18.
6 changes: 2 additions & 4 deletions tests/scripts/pulpcore/test_query_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ expect_succ pulp file repository create --name bbbbbbbbbb
expect_succ pulp file repository create --name cccccccccc

expect_succ pulp file repository list --ordering -name
ORDERED_RESULTS=$(echo "$OUTPUT" | jq -r .[].name | tr "\n" " " | xargs)
EXPECTED_RESULTS="cccccccccc bbbbbbbbbb aaaaaaaaaa"
if [[ "$ORDERED_RESULTS" != "$EXPECTED_RESULTS" ]]; then
echo "Ordered results do not match: {$ORDERED_RESULTS} != {$EXPECTED_RESULTS}"
if ! (echo "$OUTPUT" | jq -r .[].name | sort -r -C -); then
echo -e "Ordered results are not in a reverse alphabetical order.\n$(echo $OUTPUT | jq -r .[].name)"
exit 1
fi

Expand Down

0 comments on commit c252c19

Please sign in to comment.