mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Host resource ping method should return stdout (#1927)
* Host resource ping method should return stdout Signed-off-by: Justin Moy <justin.moy@sendgrid.com> * output connection_output and socket_output Signed-off-by: Justin Moy <justin.moy@sendgrid.com> * lint Signed-off-by: Justin Moy <justin.moy@sendgrid.com> * remove output from method names / hash keys Signed-off-by: Justin Moy <justin.moy@sendgrid.com>
This commit is contained in:
parent
ced4ca1858
commit
45f3b8113c
1 changed files with 10 additions and 4 deletions
|
@ -95,8 +95,12 @@ module Inspec::Resources
|
|||
ping.fetch(:success, false)
|
||||
end
|
||||
|
||||
def output
|
||||
ping[:output]
|
||||
def connection
|
||||
ping[:connection]
|
||||
end
|
||||
|
||||
def socket
|
||||
ping[:socket]
|
||||
end
|
||||
|
||||
# returns all A records of the IP address, will return an array
|
||||
|
@ -156,7 +160,8 @@ module Inspec::Resources
|
|||
|
||||
{
|
||||
success: resp.exit_status.to_i.zero?,
|
||||
output: resp.stderr,
|
||||
connection: resp.stderr,
|
||||
socket: resp.stdout,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -194,7 +199,8 @@ module Inspec::Resources
|
|||
|
||||
{
|
||||
success: resp.exit_status.to_i.zero?,
|
||||
output: resp.stderr,
|
||||
connection: resp.stderr,
|
||||
socket: resp.stdout,
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue