diff --git a/Gemfile.lock b/Gemfile.lock index 96830d4736..541f2268e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,11 +2,31 @@ PATH remote: bosh-stemcell specs: bosh-stemcell (0.0.0) + rake + rspec + rspec-its GEM remote: https://rubygems.org/ specs: + diff-lcs (1.6.2) rake (13.3.1) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-its (2.0.0) + rspec-core (>= 3.13.0) + rspec-expectations (>= 3.13.0) + rspec-mocks (3.13.8) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.7) PLATFORMS ruby diff --git a/bosh-stemcell/bosh-stemcell.gemspec b/bosh-stemcell/bosh-stemcell.gemspec index 3aa34567d6..89ab0658d2 100644 --- a/bosh-stemcell/bosh-stemcell.gemspec +++ b/bosh-stemcell/bosh-stemcell.gemspec @@ -18,10 +18,13 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = %w[lib] + # TODO: separate stemcell specs from gem specs + spec.add_dependency "rake" + spec.add_dependency "rspec" + spec.add_dependency "rspec-its" + + # used only in gem's own specs spec.add_development_dependency "fakefs" - spec.add_development_dependency "rake" - spec.add_development_dependency "rspec" - spec.add_development_dependency "rspec-its" spec.add_development_dependency "standard" spec.add_development_dependency "timecop" end diff --git a/bosh-stemcell/lib/bosh/stemcell/build_environment.rb b/bosh-stemcell/lib/bosh/stemcell/build_environment.rb index cfa687a19a..5bb6375e35 100644 --- a/bosh-stemcell/lib/bosh/stemcell/build_environment.rb +++ b/bosh-stemcell/lib/bosh/stemcell/build_environment.rb @@ -41,7 +41,6 @@ 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" @@ -51,7 +50,6 @@ 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 664e28b699..1cf26595a9 100644 --- a/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb @@ -3,6 +3,7 @@ require "bosh/stemcell/infrastructure" require "bosh/stemcell/operating_system" require "bosh/stemcell/definition" +require "fakefs/spec_helpers" module Bosh::Stemcell describe BuildEnvironment do @@ -185,7 +186,6 @@ 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" @@ -204,7 +204,6 @@ 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}", diff --git a/bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb b/bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb index 9aade7c61e..3967ca3454 100644 --- a/bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb @@ -1,6 +1,7 @@ require "spec_helper" -require "timecop" require "bosh/stemcell/stage_runner" +require "timecop" +require "fakefs/spec_helpers" module Bosh::Stemcell describe StageRunner do diff --git a/bosh-stemcell/spec/spec_helper.rb b/bosh-stemcell/spec/spec_helper.rb index dfeef1a421..c16277e52b 100644 --- a/bosh-stemcell/spec/spec_helper.rb +++ b/bosh-stemcell/spec/spec_helper.rb @@ -1,6 +1,5 @@ require "rspec" require "rspec/its" -require "fakefs/spec_helpers" require "support/shellout_type_assertions" require "tmpdir" diff --git a/ci/tasks/build.sh b/ci/tasks/build.sh index 1cda00f4b0..00c34a73d8 100755 --- a/ci/tasks/build.sh +++ b/ci/tasks/build.sh @@ -84,16 +84,14 @@ sudo chmod u+s "$(which sudo)" sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <