summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBapu L <bapu.labade@progress.com>2022-10-18 12:22:12 +0530
committerBapu L <bapu.labade@progress.com>2022-10-21 11:28:19 +0530
commit4f04909b03b97c167cdb0e19334338df08c69e8e (patch)
treef36a0e67d46be4f90404eba493abfe371c8597d2
parenta2f1e36b21fc8498854f8a78d0d2c248d0a32af1 (diff)
downloadchef-4f04909b03b97c167cdb0e19334338df08c69e8e.tar.gz
fixed solaris test case failures
Signed-off-by: Bapu L <bapu.labade@progress.com>
-rw-r--r--spec/functional/shell_spec.rb6
-rw-r--r--spec/unit/daemon_spec.rb6
2 files changed, 7 insertions, 5 deletions
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb
index 2289df3ef1..bd3dc16218 100644
--- a/spec/functional/shell_spec.rb
+++ b/spec/functional/shell_spec.rb
@@ -80,6 +80,12 @@ describe Shell do
# so hide the require here
require "pty"
+
+ # FIXME this is temporary... Solaris envs have TERM set to unknown
+ # and the value isn't propagating from the build environment TERM
+ # variable
+ ENV["TERM"] = "vt100" if ["", "unknown"].include?(ENV["TERM"].to_s)
+
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}")
read_until(reader, "chef (#{Chef::VERSION})>")
diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index f91210277b..05a09a5857 100644
--- a/spec/unit/daemon_spec.rb
+++ b/spec/unit/daemon_spec.rb
@@ -170,11 +170,7 @@ describe Chef::Daemon do
it "should log an appropriate error message and fail miserably" do
allow(Process).to receive(:initgroups).and_raise(Errno::EPERM)
- error = "Operation not permitted"
- if RUBY_PLATFORM.match("solaris2") || RUBY_PLATFORM.match("aix")
- error = "Not owner"
- end
- expect(Chef::Application).to receive(:fatal!).with("Permission denied when trying to change 999:999 to 501:20. #{error}")
+ expect(Chef::Application).to receive(:fatal!).with(/Permission denied when trying to change 999:999 to 501:20/)
Chef::Daemon._change_privilege(testuser)
end
end