Skip to content

Commit ac21c60

Browse files
committed
(maint) addresses lint issues
1 parent c37b50c commit ac21c60

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

manifests/server/service.pp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
# Without it, we may continue doing more work before the database is
3232
# prepared leading to a nasty race condition.
3333
postgresql_conn_validator{ 'validate_service_is_running':
34-
run_as => $user,
35-
db_name => $default_database,
36-
port => $port,
37-
sleep => 1,
38-
tries => 60,
39-
psql_path => $psql_path,
40-
require => Service['postgresqld'],
41-
before => Anchor['postgresql::server::service::end']
34+
run_as => $user,
35+
db_name => $default_database,
36+
port => $port,
37+
sleep => 1,
38+
tries => 60,
39+
psql_path => $psql_path,
40+
require => Service['postgresqld'],
41+
before => Anchor['postgresql::server::service::end']
4242
}
4343
Postgresql::Server::Database <| title == $default_database |> -> Postgresql_conn_validator['validate_service_is_running']
4444
}

manifests/validate_db_connection.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
include postgresql::client
1919
include postgresql::params
2020

21-
warning("postgresql::validate_db_connection is deprecated, please use postgresql_conn_validator.")
21+
warning('postgresql::validate_db_connection is deprecated, please use postgresql_conn_validator.')
2222

2323
$psql_path = $postgresql::params::psql_path
2424
$module_workdir = $postgresql::params::module_workdir

spec/acceptance/db_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class { 'postgresql::server':
2222
apply_manifest(pp, :catch_failures => true)
2323
apply_manifest(pp, :catch_changes => true)
2424

25-
2625
# Verify that the postgres password works
2726
shell("echo 'localhost:*:*:postgres:\'space password\'' > /root/.pgpass")
2827
shell("chmod 600 /root/.pgpass")

spec/acceptance/postgresql_conn_validator_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ class { 'postgresql::server':
1010
password_hash => postgresql_password('testuser','test1'),
1111
}->
1212
postgresql::server::database { 'testdb':
13-
owner => 'testuser',
13+
owner => 'testuser',
1414
require => Postgresql::Server::Role['testuser']
1515
}->
1616
postgresql::server::database_grant { 'allow connect for testuser':
1717
privilege => 'CONNECT',
18-
db => 'testdb',
19-
role => 'testuser',
18+
db => 'testdb',
19+
role => 'testuser',
2020
}
2121
2222
EOS
@@ -28,11 +28,11 @@ class { 'postgresql::server':
2828
pp = <<-EOS
2929
#{install_pp}->
3030
postgresql_conn_validator { 'validate this':
31-
db_name => 'testdb',
31+
db_name => 'testdb',
3232
db_username => 'testuser',
3333
db_password => 'test1',
34-
host => 'localhost',
35-
psql_path => '/usr/bin/psql',
34+
host => 'localhost',
35+
psql_path => '/usr/bin/psql',
3636
}
3737
EOS
3838

@@ -65,7 +65,7 @@ class { 'postgresql::server':
6565
#{install_pp}->
6666
postgresql_conn_validator { 'validate this':
6767
psql_path => '/usr/bin/psql',
68-
tries => 3
68+
tries => 3
6969
}
7070
EOS
7171

spec/unit/puppet/provider/postgresql_conn_validator/ruby_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
let(:attributes) do
1111
{
12-
:psql_path => '/usr/bin/psql',
13-
:host => 'db.test.com',
14-
:port => '4444',
12+
:psql_path => '/usr/bin/psql',
13+
:host => 'db.test.com',
14+
:port => '4444',
1515
:db_username => 'testuser',
1616
:db_password => 'testpass'
1717
}
@@ -37,8 +37,8 @@
3737
{
3838
:connect_settings => {
3939
:PGPASSWORD => 'testpass',
40-
:PGHOST => 'db.test.com',
41-
:PGPORT => '1234'
40+
:PGHOST => 'db.test.com',
41+
:PGPORT => '1234'
4242
}
4343
}
4444
end

0 commit comments

Comments
 (0)