DEV Community


Posted on • Updated on

opunit! sanity checks for vms, containers, and servers.

When building/maintaining vm images, containers, and servers as part of your infrastructure or CI/CD pipeline how do you verify that you built the right thing?

opunit verify is a simple open-source tool that will run sanity checks against an environment. Things like, is a service running on a port, can my instance resolve dns, did the right version of a package/tool get installed?

Running opunit, will then give a test report, much like a mocha or other testing frameworks.


To setup the checks, you just need to provide a simple configuration file:

- group:
    description: "Basic checks for startup"
      - availability:
          port: 8080
          status: 200
      - version:          
         cmd: node --version
         range: ^10.x.x

You can also connect to running containers or remote servers:

# Just give address and ssh key:
$ opunit verify -c {opunit.yml path} -i ~/.ssh/server_rsa

# Or name/sha of container
$ opunit verify -c {opunit.yml path} -t {docker container name or id}

Try it out! Request any new features you think would be cool!

npm install -g opunit

Top comments (0)