Skip to content

Commit 880ee9f

Browse files
committed
firewall: tests: add debian tests for ensure => stopped
also `with Debian unstable, ensure => stopped`, seems to have been overlooked
1 parent f8ee659 commit 880ee9f

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

spec/unit/classes/firewall_linux_debian_spec.rb

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
}
4444
end
4545

46+
context 'with Debian 10, ensure => stopped' do
47+
let(:params) { { ensure: 'stopped' } }
48+
49+
it {
50+
is_expected.to contain_service('netfilter-persistent').with(
51+
ensure: 'stopped',
52+
)
53+
}
54+
end
55+
4656
context 'with Debian 11' do
4757
let(:facts) do
4858
{
@@ -83,6 +93,16 @@
8393
}
8494
end
8595

96+
context 'with Debian 11, ensure => stopped' do
97+
let(:params) { { ensure: 'stopped' } }
98+
99+
it {
100+
is_expected.to contain_service('netfilter-persistent').with(
101+
ensure: 'stopped',
102+
)
103+
}
104+
end
105+
86106
context 'with Debian unstable' do
87107
let(:facts) do
88108
{
@@ -105,4 +125,31 @@
105125
)
106126
}
107127
end
128+
129+
context 'with Debian unstable, enable => false' do
130+
let(:facts) do
131+
{
132+
osfamily: 'Debian',
133+
operatingsystem: 'Debian',
134+
operatingsystemrelease: 'unstable',
135+
}
136+
end
137+
let(:params) { { enable: 'false' } }
138+
139+
it {
140+
is_expected.to contain_service('netfilter-persistent').with(
141+
enable: 'false',
142+
)
143+
}
144+
end
145+
146+
context 'with Debian unstable, ensure => stopped' do
147+
let(:params) { { ensure: 'stopped' } }
148+
149+
it {
150+
is_expected.to contain_service('netfilter-persistent').with(
151+
ensure: 'stopped',
152+
)
153+
}
154+
end
108155
end

0 commit comments

Comments
 (0)