Close

test infrastructure with serverspec, inspec, or pytest

Here’s a simple hello world pytest example to run on a centos box:

Announcement

I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!
$ cat test_sample.py
import commands
status, outputx = commands.getstatusoutput("yum info tree | grep '^Repo' | grep -o 'installed'")
def test_answer():
    assert outputx == 'installed'