mirror of
https://github.com/inspec/inspec
synced 2024-11-25 22:20:27 +00:00
bugfix: postgres connection error detection fixed
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
21d604820a
commit
18277ddfad
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class PostgresSession
|
|||
# run the query
|
||||
cmd = Serverspec::Type::Command.new("PGPASSWORD='#{@pass}' psql -U #{@user} #{dbs} -c \"#{escaped_query}\"")
|
||||
out = cmd.stdout + "\n" + cmd.stderr
|
||||
if out =~ /Can't connect to .*/ or
|
||||
if out =~ /could not connect to .*/ or
|
||||
out.downcase =~ /^error/
|
||||
# skip this test if the server can't run the query
|
||||
RSpec.describe( cmd ) do
|
||||
|
|
Loading…
Reference in a new issue