Last active
December 18, 2015 11:56
-
-
Save raphink/4e74929c7926766089c2 to your computer and use it in GitHub Desktop.
Augeas serverspec resource type, using PoC at https://github.com/raphink/serverspec/compare/dev/augeas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe augeas('/files/etc/fstab/*[file="/"]/vfstype') do | |
it { should match 1 } | |
its(:value) { should eq 'ext4' } | |
it { should have_node('../dump') } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Augeas "/files/etc/fstab/*[file="/"]/vfstype" | |
should match 1 | |
should have node "../dump" | |
value | |
should eq "ext4" |
Hi,
I tried the below configuration with serverspec test, seems serverspec doesn't support augeas
describe augeas('/files/etc/test.defs/test_value') do
it { should match 90 }
end
But getting below error
/etc/puppetlabs/puppet/modules/testmodule/spec/localhosts/testfile_spec:3:in <top (required)>': undefined method
augeas' for main:Object (NoMethodError)
Any update on this
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is awesome! I hope this makes it into serverspec.