-
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
Conversation
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.
Is this a rather recently added feature in pulp_rpm?
If yes, do you think we can guard it's use by has_plugin
?
edit: Probybly needs_plugin
being lazy is the better choice.
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 |
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.
Is this a rather recently added feature in pulp_rpm?
If yes, do you think we can guard it's use byhas_plugin
?edit: Probybly
needs_plugin
being lazy is the better choice.
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.
@@ -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 comment
The 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, ...?
Can you add a test for that?
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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
repushed a change constraining retain-package-versions to integer
closes #172