Skip to content

Commit

Permalink
ajout test
Browse files Browse the repository at this point in the history
  • Loading branch information
ccarrez committed Aug 13, 2021
1 parent 12748c3 commit a52e729
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/defines/component/action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,32 @@
)
end
end

context 'action with array in config' do
let(:params) do
{
type: 'omrelp',
priority: 40,
target: '50_rsyslog.conf',
confdir: '/etc/rsyslog.d',
config: {
'tls.permittedpeer' => ['permittedpeer1', 'permittedpeer2'],
}
}
end

it do
is_expected.to contain_concat__fragment('rsyslog::component::action::myaction').with_content(<<-CONTENT
# myaction
action(type="omrelp"
name="myaction"
tls.permittedpeer=[ "permittedpeer1", "permittedpeer2" ]
)
CONTENT
)
end

it { is_expected.to contain_concat('/etc/rsyslog.d/50_rsyslog.conf') }
it { is_expected.to contain_rsyslog__generate_concat('rsyslog::concat::action::myaction') }
end
end

0 comments on commit a52e729

Please sign in to comment.