diff options
-rw-r--r-- | spec/integration/client/client_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/deps_spec.rb | 22 |
2 files changed, 10 insertions, 16 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index 1a97acb561..e00664f1e3 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -47,7 +47,7 @@ describe "chef-client" do # cf. CHEF-4914 let(:chef_client) { "ruby '#{chef_dir}/chef-client' --minimal-ohai" } - let(:critical_env_vars) { %w(PATH RUBYOPT BUNDLE_GEMFILE).map {|o| "#{o}=#{ENV[o]}"} .join(' ') } + let(:critical_env_vars) { %w(PATH RUBYOPT BUNDLE_GEMFILE GEM_PATH).map {|o| "#{o}=#{ENV[o]}"} .join(' ') } when_the_repository "has a cookbook with a no-op recipe" do before { file 'cookbooks/x/recipes/default.rb', '' } @@ -362,7 +362,7 @@ EOM it 'should fail when passed --recipe-url and not passed -z' do result = shell_out("#{chef_client} --recipe-url=http://localhost:9000/recipes.tgz", :cwd => tmp_dir) - expect(result.exitstatus).to eq(1) + expect(result.exitstatus).not_to eq(0) end end end diff --git a/spec/integration/knife/deps_spec.rb b/spec/integration/knife/deps_spec.rb index 3120db4940..b7333cefda 100644 --- a/spec/integration/knife/deps_spec.rb +++ b/spec/integration/knife/deps_spec.rb @@ -216,22 +216,16 @@ depends "self"' end it 'knife deps prints each once' do - knife('deps /cookbooks/foo /cookbooks/self').should_succeed <<EOM -/cookbooks/baz -/cookbooks/bar -/cookbooks/foo -/cookbooks/self -EOM + knife('deps /cookbooks/foo /cookbooks/self').should_succeed( + stdout: "/cookbooks/baz\n/cookbooks/bar\n/cookbooks/foo\n/cookbooks/self\n", + stderr: "WARN: Ignoring self-dependency in cookbook self, please remove it (in the future this will be fatal).\n" + ) end it 'knife deps --tree prints each once' do - knife('deps --tree /cookbooks/foo /cookbooks/self').should_succeed <<EOM -/cookbooks/foo - /cookbooks/bar - /cookbooks/baz - /cookbooks/foo -/cookbooks/self - /cookbooks/self -EOM + knife('deps --tree /cookbooks/foo /cookbooks/self').should_succeed( + stdout: "/cookbooks/foo\n /cookbooks/bar\n /cookbooks/baz\n /cookbooks/foo\n/cookbooks/self\n", + stderr: "WARN: Ignoring self-dependency in cookbook self, please remove it (in the future this will be fatal).\n" + ) end end when_the_repository 'has roles with circular dependencies' do |