-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Linux Client tests #10
base: master
Are you sure you want to change the base?
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.
Other thoughts I had were to add a fixture apypie which would provide an authenticated API client instance. That can be used to build up fixtures such as a content view.
host = testinfra.get_host(request.param) | ||
|
||
subman = host.package("subscription-manager") | ||
if not subman.is_installed: | ||
print('Installing subscription-manager') | ||
host.run('yum -y install subscription-manager') | ||
|
||
return host |
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 just an example. I also considered making it an explicit parameter on the CLI pytest invocation and spawn them on demand here so they wouldn't be reused between tests. That's probably a much cleaner implementation.
|
||
``` | ||
podman run --rm --detach --label smoker-linux-client --name centos-7 centos:7 /sbin/init | ||
podman run --rm --detach --label smoker-linux-client --name centos-8 centos:8 /sbin/init |
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 noticed that not all container images have systemd installed by default.
This is a very basic version, but shows some general concepts. The goal is to allow discussion on how to replace the bats tests.