summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2021-05-04 11:02:52 -0700
committerGitHub <noreply@github.com>2021-05-04 11:02:52 -0700
commita90a33f70cc4baa8af9b532fdc7f444024c6f28d (patch)
treed4f7351cc66c092343de8326ddb954a6967736bf
parente8f006f7aee4d5dd768df6306fdf48727f6fcaf3 (diff)
parent5ff105979452421f137a91262ddf801be7ddcdfa (diff)
downloadchef-a90a33f70cc4baa8af9b532fdc7f444024c6f28d.tar.gz
Merge pull request #11518 from chef/lcg/fix-yum-specs
Fix yum specs
-rw-r--r--lib/chef/provider/package/yum/python_helper.rb1
-rw-r--r--spec/unit/provider/package/yum/python_helper_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/provider/package/yum/python_helper.rb b/lib/chef/provider/package/yum/python_helper.rb
index 86aaf7230a..926efef8f3 100644
--- a/lib/chef/provider/package/yum/python_helper.rb
+++ b/lib/chef/provider/package/yum/python_helper.rb
@@ -76,6 +76,7 @@ class Chef
stderr.close unless stderr.nil?
inpipe.close unless inpipe.nil?
outpipe.close unless outpipe.nil?
+ stdin = stdout = stderr = inpipe = outpipe = wait_thr = nil
end
end
diff --git a/spec/unit/provider/package/yum/python_helper_spec.rb b/spec/unit/provider/package/yum/python_helper_spec.rb
index 39c067d135..b8336a500b 100644
--- a/spec/unit/provider/package/yum/python_helper_spec.rb
+++ b/spec/unit/provider/package/yum/python_helper_spec.rb
@@ -21,6 +21,7 @@ require "spec_helper"
describe Chef::Provider::Package::Yum::PythonHelper do
let(:helper) { Chef::Provider::Package::Yum::PythonHelper.instance }
+ before(:each) { Singleton.__init__(Chef::Provider::Package::Yum::PythonHelper) }
it "propagates stacktraces on stderr from the forked subprocess", :rhel do
allow(helper).to receive(:yum_command).and_return("ruby -e 'raise \"your hands in the air\"'")