mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Fix for error in the verify pipeline for Windows test
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
60af225ed3
commit
8ebeca5c64
1 changed files with 4 additions and 3 deletions
|
@ -1,10 +1,11 @@
|
|||
module Inspec::Resources
|
||||
class Lines
|
||||
attr_reader :output
|
||||
attr_reader :output, :exit_status
|
||||
|
||||
def initialize(raw, desc)
|
||||
def initialize(raw, desc, exit_status)
|
||||
@output = raw
|
||||
@desc = desc
|
||||
@exit_status = exit_status
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
@ -40,7 +41,7 @@ module Inspec::Resources
|
|||
if cmd.exit_status != 0 || out =~ /Unable to connect to any servers/ || out.downcase =~ /^error:.*/
|
||||
raise Inspec::Exceptions::ResourceFailed, "Cassandra query with errors: #{out}"
|
||||
else
|
||||
Lines.new(cmd.stdout.strip, "Cassandra query: #{q}")
|
||||
Lines.new(cmd.stdout.strip, "Cassandra query: #{q}", cmd.exit_status)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue