Skip to content

Container conditions to skip tests? #102

@juju4

Description

@juju4

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions