Skip to content

Commit

Permalink
add spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Mar 11, 2024
1 parent 60d990c commit f5f2c61
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ class { 'redis':

it { is_expected.to contain_service('redis-server-app2.service').with_ensure(true).with_enable(true) }
end

context 'with custom options' do
let(:title) { 'default' }
let(:params) do
{
config_file_orig: '/tmp/myorig.conf',
custom_options: { 'myoption' => 'avalue', 'anotheroption' => 'anothervalue' },
}
end

it do
is_expected.to contain_file('/tmp/myorig.conf').
with_content(%r{^bind 127.0.0.1}).
with_content(%r{^myoption avalue}).
with_content(%r{^anotheroption anothervalue})
end
end
end
end
end

0 comments on commit f5f2c61

Please sign in to comment.