Skip to content

Commit 6fe076b

Browse files
committed
Add a test for system-wide dropins
A user can set up top-level drop-ins per types to change some aspect of all units of that type. Add a test with such a configuration to show that it works as expected.
1 parent 3e094de commit 6fe076b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/defines/dropin_file_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@
183183
expect(subject).not_to create_systemd__daemon_reload(params[:unit])
184184
}
185185
end
186+
187+
context 'with system dropins' do
188+
let(:params) do
189+
super().merge(unit: 'service')
190+
end
191+
192+
it { is_expected.to compile.with_all_deps }
193+
194+
it { is_expected.to contain_file("/etc/systemd/system/#{params[:unit]}.d/#{title}") }
195+
end
186196
end
187197
end
188198
end

0 commit comments

Comments
 (0)