Merge pull request #379 from chef/sr/use-empty-iso

integration tests: stop using alpine iso
This commit is contained in:
Christoph Hartmann 2016-01-21 11:04:09 +01:00
commit a5ed04d51c
4 changed files with 8 additions and 8 deletions

Binary file not shown.

View file

@ -4,9 +4,9 @@
#
# file mount tests
# download alpine linux for file mount tests
remote_file '/root/alpine-3.3.0-x86_64.iso' do
source 'http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.0-x86_64.iso'
# copy iso file for mount tests
# NB created using `mkdir empty; mkisofs -o empty.iso empty/`
cookbook_file '/root/empty.iso' do
owner 'root'
group 'root'
mode '0755'
@ -21,9 +21,9 @@ directory '/mnt/iso-disk' do
action :create
end
# mount -o loop /root/alpine-3.3.0-x86_64.iso /mnt/iso-disk
# mount -o loop /root/empty.iso /mnt/iso-disk
mount '/mnt/iso-disk' do
device '/root/alpine-3.3.0-x86_64.iso'
device '/root/empty.iso'
options 'loop'
action [:mount, :enable]
end

View file

@ -124,7 +124,7 @@ if os.unix?
it { should be_mounted }
it { should be_mounted.with( :type => 'iso9660' ) }
it { should be_mounted.with( :type => 'iso9660', :options => { :ro => true } ) }
it { should be_mounted.with( :type => 'iso9660', :device => '/root/alpine-3.3.0-x86_64.iso' ) }
it { should be_mounted.with( :type => 'iso9660', :device => '/root/empty.iso' ) }
it { should_not be_mounted.with( :type => 'ext4' ) }
it { should_not be_mounted.with( :type => 'xfs' ) }
end
@ -133,7 +133,7 @@ if os.unix?
# also see mount_spec.rb
describe file('/mnt/iso-disk') do
it { should be_mounted.only_with( {
:device=>"/root/alpine-3.3.0-x86_64.iso",
:device=>"/root/empty.iso",
:type=>"iso9660",
:options=>{
:ro=>true}

View file

@ -4,7 +4,7 @@
describe mount '/mnt/iso-disk' do
it { should be_mounted }
its('count') { should eq 1 }
its('device') { should eq '/root/alpine-3.3.0-x86_64.iso' }
its('device') { should eq '/root/empty.iso' }
its('type') { should eq 'iso9660' }
its('options') { should eq ['ro'] }
end