-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
apiv2 tests: add helpers to start/stop a local registry #9669
apiv2 tests: add helpers to start/stop a local registry #9669
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5b3fbce
to
36915cc
Compare
...and a rudimentary set of /auth tests for PR#9589 (disabled). This simply adds a new start_registry() helper function that allocates a random unused port, pulls a registry image, creates a local certificate + random username + random password, and fires everything up. Since none of this is (yet) used in CI, this is very low risk. The only infinitessimally-risky change is using a dedicated subdirectory of $WORKDIR (instead of $WORKDIR itself) as the podman root. This fixes a dumb oversight on my part: the workdir has grown to be used for much more than just podman root; this change removes clutter and makes it easier for humans to debug in cases of problems. Signed-off-by: Ed Santiago <[email protected]>
36915cc
to
e33f523
Compare
I'm having trouble running this (in the context of testing another PR #9589 ). Seems like it doesn't find any tests:
(trying it on debian testing aka bullseye, for context) It wasn't immediately apparent to me what's causing it. If it could be some local system issue, happy to look into it after this gets merged but wanted to mention it now (while it's fresh on your mind) in case you might know offhand what would cause it. |
@troyready hand-edit The confusion is my fault: I was happy with this PR, so I force-pushed it with the disabling conditional, with the goal of getting this merged soon so you can rebase on it. |
Failure is a flake, a new one: timeout in podman build. No possible way that it's my fault, so I've restarted. |
@containers/podman-maintainers PTAL. This is currently almost-entirely a NOP: it adds functionality intended for testing #9589 and potentially other auth-related endpoints. There's one minor functional change, for maintainability, but I've triple-convinced myself that it's safe. CI is flaking, but it's my bedtime and I'm not hanging out to wait for it. |
As usual, really nice work @edsantiago |
/lgtm |
...and a rudimentary set of /auth tests for PR#9589 (disabled).
This simply adds a new start_registry() helper function that
allocates a random unused port, pulls a registry image, creates
a local certificate + random username + random password, and
fires everything up. Since none of this is (yet) used in CI,
this is very low risk.
The only infinitessimally-risky change is using a dedicated
subdirectory of $WORKDIR (instead of $WORKDIR itself) as
the podman root. This fixes a dumb oversight on my part:
the workdir has grown to be used for much more than just
podman root; this change removes clutter and makes it
easier for humans to debug in cases of problems.
Signed-off-by: Ed Santiago [email protected]