mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
split integration tests for mount
This commit is contained in:
parent
9930773f37
commit
e1402a16d9
2 changed files with 10 additions and 8 deletions
|
@ -121,6 +121,7 @@ if os.unix?
|
||||||
end
|
end
|
||||||
|
|
||||||
# compare with exact match
|
# compare with exact match
|
||||||
|
# also see mount_spec.rb
|
||||||
describe file('/mnt/iso-disk') do
|
describe file('/mnt/iso-disk') do
|
||||||
it { should be_mounted.only_with( {
|
it { should be_mounted.only_with( {
|
||||||
:device=>"/root/alpine-3.3.0-x86_64.iso",
|
:device=>"/root/alpine-3.3.0-x86_64.iso",
|
||||||
|
@ -131,14 +132,6 @@ if os.unix?
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
# instead of `.with` or `.only_with` we recommend to use the `mount` resource
|
|
||||||
describe mount '/mnt/iso-disk' do
|
|
||||||
it { should be_mounted }
|
|
||||||
its('device') { should eq '/root/alpine-3.3.0-x86_64.iso' }
|
|
||||||
its('type') { should eq 'iso9660' }
|
|
||||||
its('options') { should eq ['ro'] }
|
|
||||||
end
|
|
||||||
|
|
||||||
elsif os.windows?
|
elsif os.windows?
|
||||||
describe file('C:\\Windows') do
|
describe file('C:\\Windows') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
|
|
9
test/integration/test/integration/default/mount_spec.rb
Normal file
9
test/integration/test/integration/default/mount_spec.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
# instead of `.with` or `.only_with` we recommend to use the `mount` resource
|
||||||
|
describe mount '/mnt/iso-disk' do
|
||||||
|
it { should be_mounted }
|
||||||
|
its('device') { should eq '/root/alpine-3.3.0-x86_64.iso' }
|
||||||
|
its('type') { should eq 'iso9660' }
|
||||||
|
its('options') { should eq ['ro'] }
|
||||||
|
end
|
Loading…
Reference in a new issue