File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 70
70
it { is_expected . to contain_systemd__unit_file ( 'gamma.service' ) . with_content ( "[Service]\n ExecStart=/bin/touch /tmp/foobar" ) }
71
71
end
72
72
73
+ context 'with timer activated service' do
74
+ let ( :params ) do
75
+ {
76
+ active : true ,
77
+ enable : true ,
78
+ timer_content : "[Timer]\n OnCalendar=hourly" ,
79
+ service_content : "[Service]\n ExecStart=/bin/echo timer-fired" ,
80
+ }
81
+ end
82
+
83
+ it { is_expected . to contain_systemd__unit_file ( 'foobar.timer' ) . with_content ( "[Timer]\n OnCalendar=hourly" ) }
84
+ it { is_expected . to contain_systemd__unit_file ( 'foobar.service' ) . with_content ( "[Service]\n ExecStart=/bin/echo timer-fired" ) }
85
+
86
+ it {
87
+ is_expected . to create_exec ( 'foobar.service-systemctl-daemon-reload' ) . with (
88
+ command : "systemctl daemon-reload" ,
89
+ refreshonly : true ,
90
+ )
91
+ }
92
+ end
93
+
73
94
context 'with a bad timer name' do
74
95
let ( :title ) { 'foobar' }
75
96
You can’t perform that action at this time.
0 commit comments