Ask Your Question

dependency module check in serverspec

asked 2015-12-22 05:23:05 -0600

Chutki gravatar image


How to check dependency modules in the serverspec test

I have below manifests and it used other modules manifests

$fs_lvm = hiera_hash('lvm::mod::cli_conf')
create_resources('lvm::filesystem', $fs_lvm)

Here I am passing hiera value to "vm::filesystem" modules. So, is this possible in the serverspec tests.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-23 06:21:30 -0600

Using Serverspec command resource types you can make assertions about the output of any arbitrary command:

describe command('lvs') do
  its(:stdout) { should match /.../ }

Also try Google. :)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-22 05:23:05 -0600

Seen: 98 times

Last updated: Dec 23 '15