diff options
author | Neha Pansare <neha.pansare@progress.com> | 2022-02-18 18:11:13 +0530 |
---|---|---|
committer | Neha Pansare <neha.pansare@progress.com> | 2022-02-23 13:04:38 +0530 |
commit | 5208300142c26fee0bb425a6bc7f0f1a11b897dc (patch) | |
tree | 604c11a5738e37c8acddcdd4e7dd43ae8e077e13 | |
parent | e67094a0e336bd72968eb1071b0b765858cddb78 (diff) | |
download | chef-5208300142c26fee0bb425a6bc7f0f1a11b897dc.tar.gz |
Update existing tests to use corresponding cinc-client binary names for chef-client, chef-solo, chef-shell, add option --always-dump-stacktrace to those calls
Signed-off-by: Neha Pansare <neha.pansare@progress.com>
-rw-r--r-- | spec/functional/shell_spec.rb | 2 | ||||
-rw-r--r-- | spec/functional/version_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/client/client_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/client/exit_code_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/client/ipv6_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/compliance/compliance_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/accumulator_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_inline_resources_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/notifies_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/notifying_block_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/remote_directory.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/unified_mode_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/use_partial_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/solo/solo_spec.rb | 4 |
15 files changed, 17 insertions, 17 deletions
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb index 2289df3ef1..b290c778fa 100644 --- a/spec/functional/shell_spec.rb +++ b/spec/functional/shell_spec.rb @@ -81,7 +81,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 --no-multiline --no-singleline --no-colorize -c #{config} #{options}") + reader, writer, pid = PTY.spawn("bundle exec #{ChefUtils::Dist::Infra::SHELL} --always-dump-stacktrace --no-multiline --no-singleline --no-colorize -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 3b348ed024..e5f78d60e6 100644 --- a/spec/functional/version_spec.rb +++ b/spec/functional/version_spec.rb @@ -25,7 +25,7 @@ describe "Chef Versions", :executables do include Chef::Mixin::ShellOut let(:chef_dir) { File.join(__dir__, "..", "..") } - binaries = [ ChefUtils::Dist::Infra::CLIENT, "chef-shell", "chef-apply", ChefUtils::Dist::Solo::EXEC ] + binaries = [ ChefUtils::Dist::Infra::CLIENT, ChefUtils::Dist::Infra::SHELL, "chef-apply", ChefUtils::Dist::Solo::EXEC ] binaries.each do |binary| it "#{binary} version should be sane" do diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index bec58eb682..9bf7497a9e 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -89,8 +89,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 #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai" } - let(:chef_solo) { "bundle exec #{ChefUtils::Dist::Solo::EXEC} --legacy-mode --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } + let(:chef_solo) { "bundle exec #{ChefUtils::Dist::Solo::EXEC} --legacy-mode --minimal-ohai --always-dump-stacktrace" } let(:client_name) { "chef-973334" } context "when validation.pem in current Directory" do diff --git a/spec/integration/client/exit_code_spec.rb b/spec/integration/client/exit_code_spec.rb index f552ae0fc1..981942815b 100644 --- a/spec/integration/client/exit_code_spec.rb +++ b/spec/integration/client/exit_code_spec.rb @@ -23,7 +23,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 #{ChefUtils::Dist::Infra::CLIENT} --no-fork --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --no-fork --minimal-ohai --always-dump-stacktrace" } 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 f575f9db95..33b8fd6e86 100644 --- a/spec/integration/client/ipv6_spec.rb +++ b/spec/integration/client/ipv6_spec.rb @@ -76,7 +76,7 @@ describe "chef-client" do let(:chef_dir) { File.join(__dir__, "..", "..", "..") } - let(:chef_client_cmd) { %Q{bundle exec chef-client --minimal-ohai -c "#{path_to("config/client.rb")}" -lwarn} } + let(:chef_client_cmd) { %Q{bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai -c "#{path_to("config/client.rb")}" -lwarn --always-dump-stacktrace} } after do FileUtils.rm_rf(cache_path) diff --git a/spec/integration/compliance/compliance_spec.rb b/spec/integration/compliance/compliance_spec.rb index 7524f7d56d..c143785d54 100644 --- a/spec/integration/compliance/compliance_spec.rb +++ b/spec/integration/compliance/compliance_spec.rb @@ -20,7 +20,7 @@ describe "chef-client with compliance phase" 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 #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } when_the_repository "has a custom profile" do let(:report_file) { path_to("report_file.json") } diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb index 4edd8d6394..9cdbd3978d 100644 --- a/spec/integration/recipes/accumulator_spec.rb +++ b/spec/integration/recipes/accumulator_spec.rb @@ -17,7 +17,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) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 5cfbe6ea5d..e04cd1186b 100644 --- a/spec/integration/recipes/lwrp_inline_resources_spec.rb +++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb @@ -17,7 +17,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) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 e9299b9018..c023465ba9 100644 --- a/spec/integration/recipes/lwrp_spec.rb +++ b/spec/integration/recipes/lwrp_spec.rb @@ -17,7 +17,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) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 c44e014028..ac23cbe174 100644 --- a/spec/integration/recipes/notifies_spec.rb +++ b/spec/integration/recipes/notifies_spec.rb @@ -23,7 +23,7 @@ describe "notifications" do include Chef::Mixin::ShellOut let(:chef_dir) { File.expand_path("../../..", __dir__) } - let(:chef_client) { "bundle exec chef-client --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 15b56c8ce2..0fe7acd8b5 100644 --- a/spec/integration/recipes/notifying_block_spec.rb +++ b/spec/integration/recipes/notifying_block_spec.rb @@ -24,7 +24,7 @@ describe "notifying_block" do include Chef::Mixin::ShellOut let(:chef_dir) { File.expand_path("../../..", __dir__) } - let(:chef_client) { "bundle exec chef-client --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 4d0bcd3514..adf02f7628 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) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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 d79d534490..471c42c8eb 100644 --- a/spec/integration/recipes/unified_mode_spec.rb +++ b/spec/integration/recipes/unified_mode_spec.rb @@ -8,7 +8,7 @@ describe "Unified Mode" do let(:chef_dir) { File.expand_path("../../..", __dir__) } - let(:chef_client) { "bundle exec chef-client --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } 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/recipes/use_partial_spec.rb b/spec/integration/recipes/use_partial_spec.rb index f1d9a8eddc..17faf809f8 100644 --- a/spec/integration/recipes/use_partial_spec.rb +++ b/spec/integration/recipes/use_partial_spec.rb @@ -23,7 +23,7 @@ describe "notifying_block" do include Chef::Mixin::ShellOut let(:chef_dir) { File.expand_path("../../..", __dir__) } - let(:chef_client) { "bundle exec chef-client --minimal-ohai" } + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai --always-dump-stacktrace" } when_the_repository "has a cookbook with partial resources" do before do diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb index 12a49dade6..1aa471d691 100644 --- a/spec/integration/solo/solo_spec.rb +++ b/spec/integration/solo/solo_spec.rb @@ -18,7 +18,7 @@ describe ChefUtils::Dist::Solo::EXEC do let(:cookbook_ancient_100_metadata_rb) { cb_metadata("ancient", "1.0.0") } - let(:chef_solo) { "bundle exec #{ChefUtils::Dist::Solo::EXEC} --legacy-mode --minimal-ohai" } + let(:chef_solo) { "bundle exec #{ChefUtils::Dist::Solo::EXEC} --legacy-mode --minimal-ohai --always-dump-stacktrace" } when_the_repository "creates nodes" do let(:nodes_dir) { File.join(@repository_dir, "nodes") } @@ -28,7 +28,7 @@ describe ChefUtils::Dist::Solo::EXEC 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 |