Skip to content

Commit c89289c

Browse files
committed
Merge pull request #1 from apenney/omalashenko
Tweak spec file to account for days of rotation.
2 parents d7460d4 + d35261d commit c89289c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

spec/classes/mysql_backup_spec.rb

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
describe 'mysql::backup' do
44

55
let(:default_params) {
6-
{ 'backupuser' => 'testuser',
7-
'backuppassword' => 'testpass',
8-
'backupdir' => '/tmp',
6+
{ 'backupuser' => 'testuser',
7+
'backuppassword' => 'testpass',
8+
'backupdir' => '/tmp',
9+
'backuprotate' => '25',
10+
'delete_before_dump' => true,
911
}
1012
}
1113
context "standard conditions" do
@@ -37,6 +39,11 @@
3739
' --all-databases | bzcat -zc > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql.bz2',
3840
])
3941
end
42+
43+
it 'should have 25 days of rotation' do
44+
# MySQL counts from 0 I guess.
45+
should contain_file('mysqlbackup.sh').with_content(/.*ROTATE=24.*/)
46+
end
4047
end
4148

4249
context "with compression disabled" do

0 commit comments

Comments
 (0)