We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d7460d4 + d35261d commit c89289cCopy full SHA for c89289c
spec/classes/mysql_backup_spec.rb
@@ -3,9 +3,11 @@
3
describe 'mysql::backup' do
4
5
let(:default_params) {
6
- { 'backupuser' => 'testuser',
7
- 'backuppassword' => 'testpass',
8
- 'backupdir' => '/tmp',
+ { 'backupuser' => 'testuser',
+ 'backuppassword' => 'testpass',
+ 'backupdir' => '/tmp',
9
+ 'backuprotate' => '25',
10
+ 'delete_before_dump' => true,
11
}
12
13
context "standard conditions" do
@@ -37,6 +39,11 @@
37
39
' --all-databases | bzcat -zc > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql.bz2',
38
40
])
41
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
47
48
49
context "with compression disabled" do
0 commit comments