Skip to content
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

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

fao89
Copy link
Member

@fao89 fao89 commented Jan 27, 2022

closes #801

@fao89 fao89 requested a review from a team as a code owner January 27, 2022 11:04
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:
Copy link
Member

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).

Copy link
Member Author

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

@fao89
Copy link
Member Author

fao89 commented Jan 27, 2022

Should we disable this single commit validation? @pulp/ansible
It disturbs more than helps

@patchback
Copy link

patchback bot commented Jan 27, 2022

Backport to 0.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/0.11/750e8b019ebf0be1400822a26ac9dab178654b60/pr-802

Backported as #805

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@@ -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):
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synchronization using authenticated proxy is failing
3 participants