summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/shell_spec.rb7
-rw-r--r--spec/unit/daemon_spec.rb6
2 files changed, 7 insertions, 6 deletions
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb
index 203b6346b2..9430970552 100644
--- a/spec/functional/shell_spec.rb
+++ b/spec/functional/shell_spec.rb
@@ -78,8 +78,13 @@ describe Shell do
def run_chef_shell_with(options)
# Windows ruby installs don't (always?) have PTY,
# 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 #{ChefUtils::Dist::Infra::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