diff --git a/test/integration/cookbooks/os_prepare/files/empty.iso b/test/integration/cookbooks/os_prepare/files/empty.iso new file mode 100644 index 000000000..ee42e9266 Binary files /dev/null and b/test/integration/cookbooks/os_prepare/files/empty.iso differ diff --git a/test/integration/cookbooks/os_prepare/recipes/mount.rb b/test/integration/cookbooks/os_prepare/recipes/mount.rb index 37c5bbe5d..94442ae28 100644 --- a/test/integration/cookbooks/os_prepare/recipes/mount.rb +++ b/test/integration/cookbooks/os_prepare/recipes/mount.rb @@ -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 diff --git a/test/integration/test/integration/default/file_spec.rb b/test/integration/test/integration/default/file_spec.rb index bc1efa464..58a77b97b 100644 --- a/test/integration/test/integration/default/file_spec.rb +++ b/test/integration/test/integration/default/file_spec.rb @@ -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} diff --git a/test/integration/test/integration/default/mount_spec.rb b/test/integration/test/integration/default/mount_spec.rb index 353ed81d0..bed60b5ab 100644 --- a/test/integration/test/integration/default/mount_spec.rb +++ b/test/integration/test/integration/default/mount_spec.rb @@ -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