File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 24
24
25
25
it { is_expected . to contain_file ( '/etc/borg' ) }
26
26
it { is_expected . to contain_file ( '/etc/profile.d/borg.sh' ) }
27
- it { is_expected . to contain_file ( '/usr/local/bin/borg-backup' ) }
27
+ it { is_expected . to contain_file ( '/usr/local/bin/borg-backup' ) . with_content ( %r{borg create.*" \| \| true} ) }
28
28
it { is_expected . to contain_file ( '/usr/local/bin/borg_exporter' ) }
29
29
it { is_expected . to contain_file ( '/etc/borg-restore.cfg' ) }
30
30
it { is_expected . to contain_class ( 'borg::install' ) }
190
190
}
191
191
end
192
192
193
- it { is_expected . not_to contain_file ( '/usr/local/bin/borg-backup' ) . with_content ( %r{/^\s +borg prune/} ) }
193
+ it { is_expected . to contain_file ( '/usr/local/bin/borg-backup' ) . without_content ( %r{/^\s +borg prune/} ) . without_content ( %r{borg create.*" \| \| true }) }
194
194
end
195
195
196
196
context 'with absolute backup destination dir present' do
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ backup_borg() {
180
180
# Change the working directory in case the source paths are relative
181
181
cd "<%= $working_directory %>"
182
182
183
- borg create "${options[@]}" --stats --verbose "$dst::backup-$(date "+%Y%m%d-%H%M%S")" "${src[@]}"
183
+ borg create "${options[@]}" --stats --verbose "$dst::backup-$(date "+%Y%m%d-%H%M%S")" "${src[@]}"<% if $manage_prune { %> || true<% } %>
184
184
<% if $manage_prune { -%>
185
185
# keep all backups from the last <%= $keep_within %> days
186
186
# keep at least one backup for each day for <%= $keep_daily %> days
You can’t perform that action at this time.
0 commit comments