mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Put back passthrough automate reporter output.
Signed-off-by: Alexander Stein <astein@flexion.us>
This commit is contained in:
parent
6748c1d704
commit
351a943b35
2 changed files with 11 additions and 1 deletions
|
@ -25,7 +25,7 @@ module Inspec::Reporters
|
|||
}
|
||||
|
||||
# optional jsonconfig passthrough options
|
||||
%w{node_name environment roles job_uuid}.each do |option|
|
||||
%w{node_name environment roles job_uuid passthrough}.each do |option|
|
||||
output[option.to_sym] = @config[option] unless @config[option].nil?
|
||||
end
|
||||
output
|
||||
|
|
|
@ -55,6 +55,10 @@ describe "inspec exec automate" do
|
|||
"job_uuid": "test123",
|
||||
"roles": ["stuff"],
|
||||
"environment": "prod",
|
||||
"passthrough": {
|
||||
"projects": ["alpha", "beta"],
|
||||
"another_tramp_datum": "another_value"
|
||||
},
|
||||
"node_name": "some_node"
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +78,7 @@ describe "inspec exec automate" do
|
|||
node_name
|
||||
job_uuid
|
||||
environment
|
||||
passthrough
|
||||
roles
|
||||
}.each do |field|
|
||||
_(json.keys).must_include field
|
||||
|
@ -86,6 +91,11 @@ describe "inspec exec automate" do
|
|||
_(json.keys).wont_include field
|
||||
end
|
||||
|
||||
# Added in InSpec v3.7.11+
|
||||
_(json.keys).must_include "passthrough"
|
||||
_(json["passthrough"].keys.sort).must_equal %w{another_tramp_datum projects}
|
||||
_(json["passthrough"]["projects"]).must_equal %w{alpha beta}
|
||||
|
||||
assert_exit_code 0, run_result
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue