File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
integration/helpers/serverspec Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
6
6
## [ Unreleased]
7
7
8
+ ### Added
9
+ - tests for connecting with a pgpass file (@majormoses )
10
+
8
11
## [ 1.4.5] - 2018-02-15
9
12
### Fixed
10
13
- metric-postgres-graphite.rb: use the custom defined port when connecting to slave (@henkjan )
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ source /etc/profile
15
15
DATA_DIR=/tmp/kitchen/data
16
16
RUBY_HOME=${MY_RUBY_HOME}
17
17
18
+ # setup a .pgpass file
19
+ cat << EOF > /tmp/.pgpass
20
+ *:5432:*:postgres:<REDACTED>
21
+ EOF
22
+
18
23
# Start bootatraping
19
24
20
25
# # install some required deps for pg_gem to install
Original file line number Diff line number Diff line change 23
23
its ( :exit_status ) { should eq 0 }
24
24
its ( :stdout ) { should match ( /CheckPostgres OK: Server version: {"version"=>"PostgreSQL/ ) }
25
25
end
26
+
27
+ describe command ( "#{ check } --hostname #{ pg_host } --pgpass /tmp/.pgpass" ) do
28
+ its ( :exit_status ) { should eq 0 }
29
+ its ( :stdout ) { should match ( /CheckPostgres OK: Server version: {"version"=>"PostgreSQL/ ) }
30
+ end
You can’t perform that action at this time.
0 commit comments