-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach pulp-rpm-repository about retain-package-versions. #173
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Taught rpm/repository about the retain-package-versions attribute. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
pulp debug has-plugin --name "rpm" || exit 3 | ||
|
||
cleanup() { | ||
pulp rpm remote destroy --name "cli_test_rpm_remote" || true | ||
pulp rpm repository destroy --name "cli_test_rpm_repository" || true | ||
pulp rpm distribution destroy --name "cli_test_rpm_distro" || true | ||
pulp rpm repository destroy --name "cli_test_rpm_repository" || true | ||
pulp rpm remote destroy --name "cli_test_rpm_remote" || true | ||
} | ||
trap cleanup EXIT | ||
|
||
|
@@ -40,6 +40,10 @@ expect_succ curl "$curl_opt" --head --fail "$PULP_BASE_URL/pulp/content/cli_test | |
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 | ||
|
||
expect_succ pulp rpm repository update --name "cli_test_rpm_repository" --retain-package-versions 2 | ||
expect_succ pulp rpm repository show --name "cli_test_rpm_repository" | ||
test "$(echo "$OUTPUT" | jq -r '.retain_package_versions')" = "2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To disable that function, do you nullify it, or will it be set to 0, -1, ...? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set to 0 turns it off - will add a test, good call. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case (also being an integer) we probably don't need a test. For nullifying there can be interesting side effects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. repushed a change constraining retain-package-versions to integer |
||
|
||
expect_succ pulp rpm distribution destroy --name "cli_test_rpm_distro" | ||
expect_succ pulp rpm publication destroy --href "$PUBLICATION_HREF" | ||
expect_succ pulp rpm publication destroy --href "$PUBLICATION_VER_HREF" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup in reverse order?
Fine for me! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making the cleanup() match the order at test-end :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature has been in pulp_rpm since June , released in pulp_rpm 3.5 - does it really need a guard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
June is older than any CLI-Release. I believe we agreed to support about 5 releases back. So assuming your test would fail on earlier versions of pulp_rpm (which it doesn't in the cli) i think we are safe.