-
Notifications
You must be signed in to change notification settings - Fork 23
Some adjustments to use behave tests with Podman #62
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
Conversation
2f713a5 to
5ca0444
Compare
|
Hi @rnc, for your consideration :) |
This is very interesting. Does it solve cekit/cekit#495 ? I think there needs to be some documentation or pointers at least for setup? In that issue you mentioned about logging - is that still a problem? |
I don't think it completely solves it, but it moves us much closer. I think some of the steps may need adjusting to work with both docker and podman.
Should that go in this repo, or extend the Cekit docs?
I need to try re-running all our image tests with this change and podman to see how they fair. |
Well the only docs in this repo is what you just did in #78 so I think perhaps adding to CEKit docs in https://docs.cekit.io/en/latest/handbook/testing/behave.html might be best.
Ok cool. |
|
@jmtd wrote:
I did that, good results: @rnc wrote:
I'll prepare that in another PR. Do you consider that blocking this one? |
|
I've recently learned/remembered the env var However, this repo doesn't use the python-docker client API, but the low-level API, which doesn't honour DOCKER_HOST. I think this PR could be shrunk to only 80519a2 if we used DOCKER_HOST as the name, and bd6f051 would no longer be necessary. I am testing. |
|
Confirmed with local testing. PR shrunk and improved. I've left in the clean-up 36f8f8b even though it's no longer strictly necessary; I think it aids code clarity. |
DOCKER_HOST is an environment variable to describe the URI to connect
to.
It was originally defined and honoured by /usr/bin/docker and some bits
of the python docker API (the Client API, but not the low-level API we
use, alas). It's also supported by s2i.
BY honouring it in behave-tests-steps, the end-user can use Podman
instead of Docker, e.g.
$ systemctl --user start podman.service
$ export DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock
$ cekit … test behave
Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
Use python3 f-strings so we can use the variable name directly at the substitution site and not have to keep count of the number of '%s' we've put in. Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
|
Docs: cekit/cekit#943 |
Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
|
Note: it turns out |
This introduces an environment variable CTF_API_SOCK, defaulting to
unix://var/run/docker.sock, to permit a user to point it at another API end-point, such as Podman.