summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2019-10-29 16:50:12 -0400
committerRobb Kidd <robb@thekidds.org>2019-10-29 17:11:48 -0400
commita7320b4c65f4b776e4c7426ebc753c8e9548258a (patch)
tree5d7c3cb4d422467ccad3038342216d012e3b982c
parent6a006818b0e3839e986e69ab2c7c6e08ba394b51 (diff)
downloadchef-habiliniwindochef.tar.gz
remove "bundle exec" from shellouts in specshabiliniwindochef
These don't work in a Habitat world where gems are on the GEM_PATH and we don't rely on bundler for version lock-downs. Signed-off-by: Robb Kidd <robb@thekidds.org>
-rw-r--r--spec/functional/resource/group_spec.rb2
-rw-r--r--spec/functional/shell_spec.rb2
-rw-r--r--spec/functional/version_spec.rb2
-rw-r--r--spec/integration/client/client_spec.rb4
-rw-r--r--spec/integration/client/exit_code_spec.rb2
-rw-r--r--spec/integration/client/ipv6_spec.rb2
-rw-r--r--spec/integration/recipes/accumulator_spec.rb2
-rw-r--r--spec/integration/recipes/lwrp_inline_resources_spec.rb2
-rw-r--r--spec/integration/recipes/lwrp_spec.rb2
-rw-r--r--spec/integration/recipes/notifies_spec.rb2
-rw-r--r--spec/integration/recipes/notifying_block_spec.rb2
-rw-r--r--spec/integration/recipes/remote_directory.rb2
-rw-r--r--spec/integration/recipes/unified_mode_spec.rb2
-rw-r--r--spec/integration/solo/solo_spec.rb4
14 files changed, 16 insertions, 16 deletions
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb
index 5b34ad92d0..e56b7c8833 100644
--- a/spec/functional/resource/group_spec.rb
+++ b/spec/functional/resource/group_spec.rb
@@ -152,7 +152,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
let(:excluded_members) { [] }
it "should raise an error" do
- expect { group_resource.run_action(tested_action) }.to raise_error
+ expect { group_resource.run_action(tested_action) }.to raise_error(Mixlib::ShellOut::ShellCommandFailed)
end
end
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb
index dd0455fc9e..10b3d3047a 100644
--- a/spec/functional/shell_spec.rb
+++ b/spec/functional/shell_spec.rb
@@ -82,7 +82,7 @@ describe Shell do
require "pty"
config = File.expand_path("shef-config.rb", CHEF_SPEC_DATA)
- reader, writer, pid = PTY.spawn("bundle exec chef-shell -c #{config} #{options}")
+ reader, writer, pid = PTY.spawn("chef-shell -c #{config} #{options}")
read_until(reader, "chef (#{Chef::VERSION})>")
yield reader, writer if block_given?
writer.puts('"done"')
diff --git a/spec/functional/version_spec.rb b/spec/functional/version_spec.rb
index 25e3f4dba7..a5a3d08090 100644
--- a/spec/functional/version_spec.rb
+++ b/spec/functional/version_spec.rb
@@ -29,7 +29,7 @@ describe "Chef Versions", :executables do
binaries.each do |binary|
it "#{binary} version should be sane" do
- expect(shell_out!("bundle exec #{binary} -v", cwd: chef_dir).stdout.chomp).to match(/.*: #{Chef::VERSION}/)
+ expect(shell_out!("#{binary} -v", cwd: chef_dir).stdout.chomp).to match(/.*: #{Chef::VERSION}/)
end
end
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index b1763da1f0..5ff0eefa68 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -44,8 +44,8 @@ describe "chef-client" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec #{Chef::Dist::CLIENT} --minimal-ohai" }
- let(:chef_solo) { "bundle exec #{Chef::Dist::SOLOEXEC} --legacy-mode --minimal-ohai" }
+ let(:chef_client) { "#{Chef::Dist::CLIENT} --minimal-ohai" }
+ let(:chef_solo) { "#{Chef::Dist::SOLOEXEC} --legacy-mode --minimal-ohai" }
when_the_repository "has a cookbook with a no-op recipe" do
before { file "cookbooks/x/recipes/default.rb", "" }
diff --git a/spec/integration/client/exit_code_spec.rb b/spec/integration/client/exit_code_spec.rb
index 37999ab431..69417bebfd 100644
--- a/spec/integration/client/exit_code_spec.rb
+++ b/spec/integration/client/exit_code_spec.rb
@@ -21,7 +21,7 @@ describe "chef-client" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec #{Chef::Dist::CLIENT} --no-fork --minimal-ohai" }
+ let(:chef_client) { "#{Chef::Dist::CLIENT} --no-fork --minimal-ohai" }
let(:critical_env_vars) { %w{PATH RUBYOPT BUNDLE_GEMFILE GEM_PATH}.map { |o| "#{o}=#{ENV[o]}" } .join(" ") }
diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb
index 2d16786334..de81dc5ac5 100644
--- a/spec/integration/client/ipv6_spec.rb
+++ b/spec/integration/client/ipv6_spec.rb
@@ -75,7 +75,7 @@ describe "chef-client" do
let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..", "..", "bin") }
- let(:chef_client_cmd) { %Q{bundle exec chef-client --minimal-ohai -c "#{path_to("config/client.rb")}" -lwarn} }
+ let(:chef_client_cmd) { %Q{chef-client --minimal-ohai -c "#{path_to("config/client.rb")}" -lwarn} }
after do
FileUtils.rm_rf(cache_path)
diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb
index 98e3581071..1d6e3947d8 100644
--- a/spec/integration/recipes/accumulator_spec.rb
+++ b/spec/integration/recipes/accumulator_spec.rb
@@ -16,7 +16,7 @@ describe "Accumulators" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
let(:aliases_temppath) do
t = Tempfile.new("chef_accumulator_test")
diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb
index b96fa1d67d..15518240a6 100644
--- a/spec/integration/recipes/lwrp_inline_resources_spec.rb
+++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb
@@ -16,7 +16,7 @@ describe "LWRPs with inline resources" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
context "with a use_inline_resources provider with 'def action_a' instead of action :a" do
class LwrpInlineResourcesTest < Chef::Resource
diff --git a/spec/integration/recipes/lwrp_spec.rb b/spec/integration/recipes/lwrp_spec.rb
index 957c1ea66f..1bdb320795 100644
--- a/spec/integration/recipes/lwrp_spec.rb
+++ b/spec/integration/recipes/lwrp_spec.rb
@@ -16,7 +16,7 @@ describe "LWRPs" do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
when_the_repository "has a cookbook named l-w-r-p" do
before do
diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb
index ae534dcad4..ed59956b4f 100644
--- a/spec/integration/recipes/notifies_spec.rb
+++ b/spec/integration/recipes/notifies_spec.rb
@@ -6,7 +6,7 @@ describe "notifications" do
include Chef::Mixin::ShellOut
let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) }
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
when_the_repository "notifies a nameless resource" do
before do
diff --git a/spec/integration/recipes/notifying_block_spec.rb b/spec/integration/recipes/notifying_block_spec.rb
index 465eca97ed..4c3741cbc7 100644
--- a/spec/integration/recipes/notifying_block_spec.rb
+++ b/spec/integration/recipes/notifying_block_spec.rb
@@ -23,7 +23,7 @@ describe "notifying_block" do
include Chef::Mixin::ShellOut
let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) }
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
when_the_repository "notifying_block test one" do
before do
diff --git a/spec/integration/recipes/remote_directory.rb b/spec/integration/recipes/remote_directory.rb
index 8332fb1b56..f68aa8afb3 100644
--- a/spec/integration/recipes/remote_directory.rb
+++ b/spec/integration/recipes/remote_directory.rb
@@ -16,7 +16,7 @@ describe Chef::Resource::RemoteDirectory do
# machine that has omnibus chef installed. In that case we need to ensure
# we're running `chef-client` from the source tree and not the external one.
# cf. CHEF-4914
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
when_the_repository "has a cookbook with a source_dir with two subdirectories, each with one file and subdir in a different alphabetical order" do
before do
diff --git a/spec/integration/recipes/unified_mode_spec.rb b/spec/integration/recipes/unified_mode_spec.rb
index 944319f7bf..978e8dc35a 100644
--- a/spec/integration/recipes/unified_mode_spec.rb
+++ b/spec/integration/recipes/unified_mode_spec.rb
@@ -7,7 +7,7 @@ describe "Unified Mode" do
let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) }
- let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
+ let(:chef_client) { "chef-client --minimal-ohai" }
when_the_repository "has a cookbook with a unified_mode resource with a delayed notification from the second block to the first block" do
before do
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb
index 451943e225..7fbf4fa6f7 100644
--- a/spec/integration/solo/solo_spec.rb
+++ b/spec/integration/solo/solo_spec.rb
@@ -17,7 +17,7 @@ describe Chef::Dist::SOLOEXEC do
let(:cookbook_ancient_100_metadata_rb) { cb_metadata("ancient", "1.0.0") }
- let(:chef_solo) { "bundle exec #{Chef::Dist::SOLOEXEC} --legacy-mode --minimal-ohai" }
+ let(:chef_solo) { "#{Chef::Dist::SOLOEXEC} --legacy-mode --minimal-ohai" }
when_the_repository "creates nodes" do
let(:nodes_dir) { File.join(@repository_dir, "nodes") }
@@ -27,7 +27,7 @@ describe Chef::Dist::SOLOEXEC do
file "config/solo.rb", <<~EOM
chef_repo_path "#{@repository_dir}"
EOM
- result = shell_out("bundle exec chef-solo -c \"#{path_to("config/solo.rb")}\" -l debug", cwd: chef_dir)
+ result = shell_out("chef-solo -c \"#{path_to("config/solo.rb")}\" -l debug", cwd: chef_dir)
result.error!
end