Skip to content

Commit

Permalink
test: new config_show_diff option
Browse files Browse the repository at this point in the history
test: fix spec linter
  • Loading branch information
teluq-pbrideau committed Oct 5, 2022
1 parent 0cf120e commit d5ddc36
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@
with_content(%r{^\s*repmgr\['enable'\] = true$})
}
end
describe 'config_show_diff' do
let(:params) do
{ config_show_diff: false }
end

it {
is_expected.to contain_file('/etc/gitlab/gitlab.rb').with(
'show_diff' => false
)
}
end
describe 'skip_auto_reconfigure' do
let(:params) { { skip_auto_reconfigure: 'present' } }

Expand Down Expand Up @@ -239,6 +250,29 @@
)
}
end
context 'with config_show_diff to false' do
let(:params) do
super().merge('config_show_diff' => false)
end

describe 'with a password for pgbouncer_password' do
let(:params) do
super().merge('pgbouncer_password' => 'PAsswd')
end

it {
is_expected.to contain_file('/home/gitlab-consul/.pgpass').with(
'ensure' => 'present',
'path' => '/home/gitlab-consul/.pgpass',
'owner' => 'gitlab-consul',
'group' => 'gitlab-consul',
'show_diff' => false
).with_content(
%r{^127.0.0.1:\*:pgbouncer:pgbouncer:PAsswd}
)
}
end
end
end
end
describe 'gitlab_rails with hash value' do
Expand Down

0 comments on commit d5ddc36

Please sign in to comment.