Skip to content

Commit fc5ff27

Browse files
committed
DELETE ME
Postgres seems to be listening on the expected port, but serverspec cannot connect to it? Attempt to do some connections to see if it is a serverspec bug or an issue with the module.
1 parent 22d05a5 commit fc5ff27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/acceptance/utf8_encoding_spec.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ class { 'postgresql::server': }
1818
export_locales('en_NG.UTF8')
1919
idempotent_apply(pp, debug: true)
2020
puts '-------------------------------'
21-
pp os
22-
puts '-------------------------------'
2321
puts LitmusHelper.instance.run_shell('ss -lntp').stdout
2422
puts '-------------------------------'
2523
puts LitmusHelper.instance.run_shell('journalctl -u postgresql').stdout
2624
puts '-------------------------------'
2725
puts LitmusHelper.instance.run_shell('systemctl status postgresql*').stdout
2826
puts '-------------------------------'
27+
puts LitmusHelper.instance.run_shell("su postgres -c 'psql -c \\\\l'").stdout
28+
puts '-------------------------------'
29+
puts LitmusHelper.instance.run_shell('true &>/dev/null </dev/tcp/127.0.0.1/5432 && echo open || echo closed').stdout
30+
puts '-------------------------------'
2931
expect(port(5432)).to be_listening.on('127.0.0.1').with('tcp')
3032
expect(psql('--command="\l" postgres', 'postgres').stdout).to match(%r{List of databases})
3133
expect(psql('--command="SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname=\'template1\'"').stdout).to match(%r{UTF8})

0 commit comments

Comments
 (0)