summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-06-30 13:32:42 -0700
committerPete Higgins <pete@peterhiggins.org>2020-06-30 13:32:42 -0700
commit73161d66c97459b8a97b8d7e3f21518102ef4381 (patch)
treea6e987b922543fec413a934542d5739ae81872d4 /spec
parente7a550ade1a01f2e297ebd5eb48fb1ce18c51399 (diff)
downloadchef-73161d66c97459b8a97b8d7e3f21518102ef4381.tar.gz
Fix more undefined references to run_context.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functional/resource/aix_service_spec.rb4
-rwxr-xr-xspec/functional/resource/aixinit_service_spec.rb1
-rw-r--r--spec/functional/resource/bff_spec.rb1
3 files changed, 6 insertions, 0 deletions
diff --git a/spec/functional/resource/aix_service_spec.rb b/spec/functional/resource/aix_service_spec.rb
index 0db0ab2385..ba86ddec31 100755
--- a/spec/functional/resource/aix_service_spec.rb
+++ b/spec/functional/resource/aix_service_spec.rb
@@ -79,6 +79,10 @@ describe Chef::Resource::Service, :requires_root, :aix_only do
shell_out("id -u #{ENV["USER"]}").stdout.chomp
end
+ let(:run_context) do
+ Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)
+ end
+
describe "When service is a subsystem" do
before(:all) do
script_dir = File.join(File.dirname(__FILE__), "/../assets/")
diff --git a/spec/functional/resource/aixinit_service_spec.rb b/spec/functional/resource/aixinit_service_spec.rb
index 0b69c9d9a5..bb89277e40 100755
--- a/spec/functional/resource/aixinit_service_spec.rb
+++ b/spec/functional/resource/aixinit_service_spec.rb
@@ -56,6 +56,7 @@ describe Chef::Resource::Service, :requires_root, :aix_only do
# Actual tests
let(:new_resource) do
+ run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)
new_resource = Chef::Resource::Service.new("chefinittest", run_context)
new_resource.provider Chef::Provider::Service::AixInit
new_resource.supports({ status: true, restart: true, reload: true })
diff --git a/spec/functional/resource/bff_spec.rb b/spec/functional/resource/bff_spec.rb
index 32358b4c39..ad45552c16 100644
--- a/spec/functional/resource/bff_spec.rb
+++ b/spec/functional/resource/bff_spec.rb
@@ -23,6 +23,7 @@ describe Chef::Resource::BffPackage, :requires_root, external: ohai[:platform] !
include Chef::Mixin::ShellOut
let(:new_resource) do
+ run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)
new_resource = Chef::Resource::BffPackage.new(@pkg_name, run_context)
new_resource.source @pkg_path
new_resource