Help language development. Donate to The Perl Foundation

Sparrowdo::Goss cpan:MELEZHIK last updated on 2020-04-27

Sparrowdo-Goss-0.0.3/

SYNOPSIS

Sparrowdo module to run goss scenarios.

Travis build status

Build Status

INSTALL

$ zef install Sparrowdo::Goss

USAGE

Here are few examples.

Install goss binary

$ cat mysql.goss.yaml

module-run 'Goss', %( action => 'install' ); # will install into default location - /usr/bin/goss

module-run 'Goss', %( action => 'install', install_path => '/home/user' ); # will install into users location - /home/user/bin

Runs goss scenarios

Pass goss yaml as is:

$ cat mysql.goss.yaml

module-run 'Goss', %( title => 'mysql checks',  yaml => << q:to/HERE/);
  port:
    tcp:3306:
      listening: true
      ip:
      - 127.0.0.1
  service:
    mysql:
      enabled: true
      running: true
  process:
    mysqld:
      running: true
HERE

Use your favorite templater to populate goss yamls:

$ cat mysql.goss.yaml

  port:
    tcp:{{port}}:
      listening: true

$ cat sparrowfile

use Template::Mustache;

module-run 'Goss', %( 
  title => 'mysql tcp port check',  
  yaml => Template::Mustache.render('mysql.goss.yaml'.IO.slurp, {  port => '3306' })
);

Sets path to goss binary:

module-run 'Goss', %( install_path => '/home/user', yaml => '...', title => '...'  );

Author

Alexey Melezhik

See also

goss