Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mirror
chef
Commits
df07dfa0
Commit
df07dfa0
authored
Oct 04, 2012
by
PrajaktaPurohit
Browse files
Getting rid of the summary_only default true for all client runs.
parent
c23fea89
Changes
2
Hide whitespace changes
Inline
Side-by-side
chef/lib/chef/resource_reporter.rb
View file @
df07dfa0
...
...
@@ -110,7 +110,7 @@ class Chef
if
reporting_enabled?
begin
resource_history_url
=
"reports/nodes/
#{
node
.
name
}
/runs"
server_response
=
@rest_client
.
post_rest
(
resource_history_url
,
{
:action
=>
:begin
}
,
{
'X-Chef-ReportingSummary'
=>
'true'
}
)
server_response
=
@rest_client
.
post_rest
(
resource_history_url
,
{
:action
=>
:begin
})
run_uri
=
URI
.
parse
(
server_response
[
"uri"
])
@run_id
=
::
File
.
basename
(
run_uri
.
path
)
Chef
::
Log
.
info
(
"Chef server generated run history id:
#{
@run_id
}
"
)
...
...
chef/spec/unit/resource_reporter_spec.rb
View file @
df07dfa0
...
...
@@ -411,7 +411,7 @@ describe Chef::ResourceReporter do
@response
=
Net
::
HTTPNotFound
.
new
(
"a response body"
,
"404"
,
"Not Found"
)
@error
=
Net
::
HTTPServerException
.
new
(
"404 message"
,
@response
)
@rest_client
.
should_receive
(
:post_rest
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}
,
{
"X-Chef-ReportingSummary"
=>
"true"
}
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}).
and_raise
(
@error
)
@resource_reporter
.
node_load_completed
(
@node
,
:expanded_run_list
,
:config
)
end
...
...
@@ -431,7 +431,7 @@ describe Chef::ResourceReporter do
before
do
response
=
{
"uri"
=>
"https://example.com/reports/nodes/spitfire/runs/ABC123"
}
@rest_client
.
should_receive
(
:post_rest
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}
,
{
"X-Chef-ReportingSummary"
=>
"true"
}
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}).
and_return
(
response
)
@resource_reporter
.
node_load_completed
(
@node
,
:expanded_run_list
,
:config
)
...
...
@@ -474,7 +474,7 @@ describe Chef::ResourceReporter do
before
do
response
=
{
"uri"
=>
"https://example.com/reports/nodes/spitfire/runs/ABC123"
,
"summary_only"
=>
"true"
}
@rest_client
.
should_receive
(
:post_rest
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}
,
{
"X-Chef-ReportingSummary"
=>
"true"
}
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}).
and_return
(
response
)
@resource_reporter
.
node_load_completed
(
@node
,
:expanded_run_list
,
:config
)
...
...
@@ -518,7 +518,7 @@ describe Chef::ResourceReporter do
before
do
response
=
{
"uri"
=>
"https://example.com/reports/nodes/spitfire/runs/ABC123"
,
"summary_only"
=>
"false"
}
@rest_client
.
should_receive
(
:post_rest
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}
,
{
"X-Chef-ReportingSummary"
=>
"true"
}
).
with
(
"reports/nodes/spitfire/runs"
,
{
:action
=>
:begin
}).
and_return
(
response
)
@resource_reporter
.
node_load_completed
(
@node
,
:expanded_run_list
,
:config
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment