summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-27 09:58:10 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-27 09:58:10 -0800
commitc3f1021fc6107808826461279cfd6eb055aa6162 (patch)
tree528219d477aed08ad1df1dcef5e831c5471bab6d /spec/support
parent3f3fbc8fb5eddf5bea28699bee358c9fb2dabc17 (diff)
parentf7b3e6a0c2d3fdbbe5479df1e540e15111dc931e (diff)
downloadchef-c3f1021fc6107808826461279cfd6eb055aa6162.tar.gz
Merge pull request #4409 from chef/lcg/suppress-reporter-failures
Lcg/suppress reporter failures
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared/context/client.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/shared/context/client.rb b/spec/support/shared/context/client.rb
index 2089928618..3c88e36fbb 100644
--- a/spec/support/shared/context/client.rb
+++ b/spec/support/shared/context/client.rb
@@ -71,6 +71,7 @@ shared_context "a client run" do
let(:http_cookbook_sync) { double("Chef::ServerAPI (cookbook sync)") }
let(:http_node_load) { double("Chef::ServerAPI (node)") }
let(:http_node_save) { double("Chef::ServerAPI (node save)") }
+ let(:reporting_rest_client) { double("Chef::ServerAPI (reporting client)") }
let(:runner) { instance_double("Chef::Runner") }
let(:audit_runner) { instance_double("Chef::Audit::Runner", :failed? => false) }
@@ -111,6 +112,10 @@ shared_context "a client run" do
expect_any_instance_of(Chef::ResourceReporter).to receive(:node_load_completed)
end
+ def stub_rest_clean
+ allow(client).to receive(:rest_clean).and_return(reporting_rest_client)
+ end
+
def stub_for_sync_cookbooks
# --Client#setup_run_context
# ---Client#sync_cookbooks -- downloads the list of cookbooks to sync
@@ -147,6 +152,7 @@ shared_context "a client run" do
stub_const("Chef::Client::STDOUT_FD", stdout)
stub_const("Chef::Client::STDERR_FD", stderr)
+ stub_rest_clean
stub_for_register
stub_for_node_load
stub_for_sync_cookbooks