test infrastructure with serverspec, inspec, or pytest

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


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