File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ class { 'mysql::server': }
24
24
let ( :params ) do
25
25
default_params
26
26
end
27
+ it 'does not contain the touch /tmp/backup_success command' do
28
+ is_expected . to contain_file ( 'xtrabackup.sh' ) . without_content (
29
+ %r{(^\s +touch\s +$)} ,
30
+ )
31
+ end
27
32
28
33
it 'contains the wrapper script' do
29
34
is_expected . to contain_file ( 'xtrabackup.sh' ) . with_content (
@@ -304,6 +309,18 @@ class { 'mysql::server': }
304
309
)
305
310
end
306
311
end
312
+
313
+ context 'with backup_success_file_path' do
314
+ let ( :params ) do
315
+ { backup_success_file_path : '/tmp/backup_success' } . merge ( default_params )
316
+ end
317
+
318
+ it 'contain the touch /tmp/backup_success command' do
319
+ is_expected . to contain_file ( 'xtrabackup.sh' ) . with_content (
320
+ %r{(^\s +touch /tmp/backup_success$)} ,
321
+ )
322
+ end
323
+ end
307
324
end
308
325
end
309
326
# rubocop:enable RSpec/NestedGroups
Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ cleanup
59
59
<% unless @delete_before_dump -%>
60
60
if [ $? -eq 0 ] ; then
61
61
cleanup
62
+ <% if @backup_success_file_path -%>
62
63
touch <%= @backup_success_file_path %>
64
+ <% end -%>
63
65
fi
64
66
<% end -%>
65
67
You can’t perform that action at this time.
0 commit comments