summaryrefslogtreecommitdiff
path: root/spec/unit/resource_reporter_spec.rb
diff options
context:
space:
mode:
authorjamesc <james@opscode.com>2013-04-28 15:31:34 -0700
committerBryan McLellan <btm@opscode.com>2013-06-18 08:58:18 -0700
commitc2a08df7d8729eba9a7786ccdf342eefffe69a43 (patch)
tree2286d88db2a89f140e966cc7b92e5f70ee9f9c64 /spec/unit/resource_reporter_spec.rb
parentbb05ee2f14b85bc40dde7e903235affd9dbdde19 (diff)
downloadchef-c2a08df7d8729eba9a7786ccdf342eefffe69a43.tar.gz
Refactor of the protocol for initializing ResourceReporter
We now extract the node info from run_started, not node_load_completed so we now don't need to have a callback on node_load_completed
Diffstat (limited to 'spec/unit/resource_reporter_spec.rb')
-rw-r--r--spec/unit/resource_reporter_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb
index 389cc79c60..c4a1de9f13 100644
--- a/spec/unit/resource_reporter_spec.rb
+++ b/spec/unit/resource_reporter_spec.rb
@@ -91,7 +91,6 @@ describe Chef::ResourceReporter do
@rest_client.stub!(:raw_http_request).and_return({"result"=>"ok"});
@rest_client.stub!(:post_rest).and_return({"uri"=>"https://example.com/reports/nodes/spitfire/runs/#{@run_id}"});
- @resource_reporter.node_load_completed(@node, :expanded_run_list, :config)
end
context "before converging any resources" do
@@ -260,7 +259,6 @@ describe Chef::ResourceReporter do
@rest_client.stub!(:raw_http_request).and_return({"result"=>"ok"});
@rest_client.stub!(:post_rest).and_return({"uri"=>"https://example.com/reports/nodes/spitfire/runs/#{@run_id}"});
- @resource_reporter.node_load_completed(@node, :expanded_run_list, :config)
@resource_reporter.run_started(@run_status)
end
@@ -367,7 +365,7 @@ describe Chef::ResourceReporter do
it "includes the run_list" do
@report.should have_key("run_list")
- @report["run_list"].should == @node.run_list.to_json
+ @report["run_list"].should == @run_status.node.run_list.to_json
end
it "includes the end_time" do
@@ -419,7 +417,7 @@ describe Chef::ResourceReporter do
describe "when updating resource history on the server" do
before do
- @resource_reporter.node_load_completed(@node, :expanded_run_list, :config)
+ @resource_reporter.run_started(@run_status)
@run_status.start_clock
end