diff --git a/README.md b/README.md index 2961ee5713..5ccb0d5b08 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ container): ```shell export short_name="jammy" cd /opt/bosh/bosh-stemcell + bundle install OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec -fd spec/os_image/ubuntu_${short_name}_spec.rb ``` @@ -149,6 +150,7 @@ container, you should be able to run the specific tests: ```shell cd /opt/bosh/bosh-stemcell; \ +bundle install \ STEMCELL_IMAGE=/mnt/stemcells/vsphere/esxi/ubuntu/work/work/vsphere-esxi-ubuntu.raw \ STEMCELL_WORKDIR=/mnt/stemcells/vsphere/esxi/ubuntu/work/work/chroot \ OS_NAME=ubuntu \ diff --git a/bosh-stemcell/bosh-stemcell.gemspec b/bosh-stemcell/bosh-stemcell.gemspec index 56f9a22f9f..3aa34567d6 100644 --- a/bosh-stemcell/bosh-stemcell.gemspec +++ b/bosh-stemcell/bosh-stemcell.gemspec @@ -21,7 +21,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "fakefs" spec.add_development_dependency "rake" spec.add_development_dependency "rspec" - spec.add_development_dependency "rspec-instafail" spec.add_development_dependency "rspec-its" spec.add_development_dependency "standard" spec.add_development_dependency "timecop" diff --git a/bosh-stemcell/lib/bosh/stemcell/build_environment.rb b/bosh-stemcell/lib/bosh/stemcell/build_environment.rb index 5bb6375e35..cfa687a19a 100644 --- a/bosh-stemcell/lib/bosh/stemcell/build_environment.rb +++ b/bosh-stemcell/lib/bosh/stemcell/build_environment.rb @@ -41,6 +41,7 @@ def prepare_build def os_image_rspec_command [ "cd #{STEMCELL_SPECS_DIR};", + "bundle install;", "OS_IMAGE=#{os_image_tarball_path}", "bundle exec rspec -fd", "spec/os_image/#{operating_system_spec_name}_spec.rb" @@ -50,6 +51,7 @@ def os_image_rspec_command def stemcell_rspec_command cmd = [ "cd #{STEMCELL_SPECS_DIR};", + "bundle install;", "STEMCELL_IMAGE=#{image_file_path}", "STEMCELL_WORKDIR=#{work_path}", "STEMCELL_INFRASTRUCTURE=#{infrastructure.name}", diff --git a/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb b/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb index c0437c9f5b..664e28b699 100644 --- a/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb @@ -185,6 +185,7 @@ module Bosh::Stemcell it "returns the correct command" do expected_rspec_command = [ "cd #{stemcell_specs_dir};", + "bundle install;", "OS_IMAGE=/some/os_image.tgz", "bundle exec rspec -fd", "spec/os_image/#{operating_system.name}_spec.rb" @@ -203,6 +204,7 @@ module Bosh::Stemcell it "returns the correct command" do expected_rspec_command = [ "cd #{stemcell_specs_dir};", + "bundle install;", "STEMCELL_IMAGE=#{File.join(work_path, "fake-root-disk-image.raw")}", "STEMCELL_WORKDIR=#{work_path}", "STEMCELL_INFRASTRUCTURE=#{infrastructure.name}",