mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Fixed review comments
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
6395137a5d
commit
3a37a6f766
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ module Inspec::Resources
|
|||
@port = port || 5432
|
||||
raise Inspec::Exceptions::ResourceFailed, "Can't run PostgreSQL SQL checks without authentication." if @user.nil? || @pass.nil?
|
||||
|
||||
set_connection
|
||||
test_connection
|
||||
end
|
||||
|
||||
def query(query, db = [])
|
||||
|
@ -65,8 +65,8 @@ module Inspec::Resources
|
|||
|
||||
private
|
||||
|
||||
def set_connection
|
||||
query('\du')
|
||||
def test_connection
|
||||
query("select now()")
|
||||
end
|
||||
|
||||
def escaped_query(query)
|
||||
|
|
Loading…
Reference in a new issue