Skip to content

Commit a52e729

Browse files
author
ccarrez
committed
ajout test
1 parent 12748c3 commit a52e729

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

spec/defines/component/action_spec.rb

+28
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,32 @@
8484
)
8585
end
8686
end
87+
88+
context 'action with array in config' do
89+
let(:params) do
90+
{
91+
type: 'omrelp',
92+
priority: 40,
93+
target: '50_rsyslog.conf',
94+
confdir: '/etc/rsyslog.d',
95+
config: {
96+
'tls.permittedpeer' => ['permittedpeer1', 'permittedpeer2'],
97+
}
98+
}
99+
end
100+
101+
it do
102+
is_expected.to contain_concat__fragment('rsyslog::component::action::myaction').with_content(<<-CONTENT
103+
# myaction
104+
action(type="omrelp"
105+
name="myaction"
106+
tls.permittedpeer=[ "permittedpeer1", "permittedpeer2" ]
107+
)
108+
CONTENT
109+
)
110+
end
111+
112+
it { is_expected.to contain_concat('/etc/rsyslog.d/50_rsyslog.conf') }
113+
it { is_expected.to contain_rsyslog__generate_concat('rsyslog::concat::action::myaction') }
114+
end
87115
end

0 commit comments

Comments
 (0)