Skip to content

Commit

Permalink
fix puppet unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHoenscheid committed Aug 24, 2023
1 parent 5ecb242 commit 5422dbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
it { is_expected.to contain_file('/var/lib/postgresql/13/main') }

it {
expect(subject).to contain_exec('postgresql_reload').with('command' => 'systemctl reload postgresql')
expect(subject).to contain_exec('postgresql_reload_main').with('command' => 'systemctl reload postgresql')
}

it 'validates connection' do
Expand Down Expand Up @@ -65,7 +65,7 @@ class { 'postgresql::globals':
end

it 'sets postgres password' do
expect(subject).to contain_exec('set_postgres_postgrespw').with('command' => '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"',
expect(subject).to contain_exec('set_postgres_postgrespw_main').with('command' => '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"',
'user' => 'postgres',

Check failure on line 69 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 69 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.

Check failure on line 69 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 69 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
'environment' => ['PGPASSWORD=new-p@s$word-to-set', 'PGPORT=5432', 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$'],

Check failure on line 70 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 70 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.

Check failure on line 70 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 70 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null")

Check failure on line 71 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 71 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.

Check failure on line 71 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 71 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
Expand All @@ -89,7 +89,7 @@ class { 'postgresql::globals':
end

it 'sets postgres password' do
expect(subject).to contain_exec('set_postgres_postgrespw').with('command' => ['/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"'],
expect(subject).to contain_exec('set_postgres_postgrespw_main').with('command' => ['/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"'],
'user' => 'postgres',

Check failure on line 93 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 93 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.

Check failure on line 93 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 93 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
'environment' => ['PGPASSWORD=new-p@s$word-to-set', 'PGPORT=5432', 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$'],

Check failure on line 94 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 94 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.

Check failure on line 94 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line. (https://rubystyle.guide#no-double-indent)

Check failure on line 94 in spec/classes/server_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null")
Expand Down Expand Up @@ -146,7 +146,7 @@ class { 'postgresql::globals':
it { is_expected.to contain_class('postgresql::server') }

it {
expect(subject).to contain_exec('postgresql_reload').with('command' => '/bin/true')
expect(subject).to contain_exec('postgresql_reload_main').with('command' => '/bin/true')
}

it 'validates connection' do
Expand Down

0 comments on commit 5422dbf

Please sign in to comment.