-
Notifications
You must be signed in to change notification settings - Fork 54
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
Use proxy auth credentials of a Remote when syncing content #802
Conversation
second_remote = self.remote_collection_api.create(second_body) | ||
self.addCleanup(self.remote_collection_api.delete, second_remote.pulp_href) | ||
|
||
with self.assertRaises(PulpTaskError) as cm: |
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.
What's the reason behind the name cm
? If it's short for "context manager" i would rather call it ctx
or exc_ctx
because its the context managed by the context manager self.assertRaises(PulpTaskError)
.
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.
I just copied the structure from another test
Should we disable this single commit validation? @pulp/ansible |
[noissue]
Backport to 0.11: 💚 backport PR created✅ Backport PR branch: Backported as #805 🤖 @patchback |
@@ -203,6 +203,54 @@ def test_sync_with_missing_collection(self): | |||
msg = "absent.not_present does not exist" | |||
self.assertIn(msg, task_result["error"]["description"], task_result["error"]["description"]) | |||
|
|||
def test_sync_with_proxy_auth(self): |
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.
This is really great. We needed some kind of test, any kind of test and you did that.
The challenge we'll have with this test is that it can't run locally without the CI deploying the proxy container. To solve that I propose we start and stop proxy.py (same code) via a pulp-smash pytest fixture. What do you think about that? Is that something you'd be willing to do? If not, maybe I can if that's helpful. I'm hoping we can switch to that style right away before tests like this get copied to more places.
closes #801