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

Container conditions to skip tests? #102

Closed
juju4 opened this issue Aug 25, 2018 · 2 comments
Closed

Container conditions to skip tests? #102

juju4 opened this issue Aug 25, 2018 · 2 comments

Comments

@juju4
Copy link
Contributor

juju4 commented Aug 25, 2018

I'm start running puppet-os-hardening and testing inside travis and kitchen/docker.

I have tests failing while using base module without any customization while fully working on upstream (travis digitalocean or VM).
I fully expect some tests to fail inside docker because some sysctl are not allowed or systemd daemons start/stop/restart not working.

Is there a condition that can be added to skip test if inside docker?
like ansible virtualization fact

Looking at tests
(centos7) https://travis-ci.org/juju4/puppet-meta-harden-linux/jobs/417935981
(bionic) https://travis-ci.org/juju4/puppet-meta-harden-linux/jobs/417935982
(centos7) https://travis-ci.org/juju4/puppet-meta-harden-linux/jobs/420516104#L2823
(bionic) https://travis-ci.org/juju4/puppet-meta-harden-linux/jobs/420516105#L3408

Thanks

@artem-sidorenko
Copy link
Member

@juju4 Thanks for this issue!

Baseline already has the container support, see this PR: #91

Puppet-os-hardening implementation is pending, see this issue: dev-sec/puppet-os-hardening#125

For the case you are looking for a reference, chef-os-hardening implementation was done in this PR: dev-sec/chef-os-hardening#199

I hope this helps

@juju4
Copy link
Contributor Author

juju4 commented Aug 26, 2018

ah that's great. I had not realized it was already as I saw some tests failing but was in other set of tests.
a pity not made to upstream inspec but will mimick this :)

Thanks a lot @artem-sidorenko!

@juju4 juju4 closed this as completed Aug 26, 2018
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

No branches or pull requests

2 participants