File tree 4 files changed +9
-14
lines changed
4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 101
101
mode => ' 0600' ,
102
102
}
103
103
104
- file { 'mysqlbackupdir' :
104
+ file { $backupdir :
105
105
ensure => ' directory' ,
106
- path => $backupdir ,
107
106
mode => $backupdirmode ,
108
107
owner => $backupdirowner ,
109
108
group => $backupdirgroup ,
110
109
}
111
-
112
110
}
Original file line number Diff line number Diff line change 70
70
content => template (' mysql/mysqlbackup.sh.erb' ),
71
71
}
72
72
73
- file { 'mysqlbackupdir' :
73
+ file { $backupdir :
74
74
ensure => ' directory' ,
75
- path => $backupdir ,
76
75
mode => $backupdirmode ,
77
76
owner => $backupdirowner ,
78
77
group => $backupdirgroup ,
79
78
}
80
-
81
79
}
Original file line number Diff line number Diff line change 67
67
require => Package[$xtrabackup_package_name ],
68
68
}
69
69
70
- file { 'mysqlbackupdir' :
70
+ file { $backupdir :
71
71
ensure => ' directory' ,
72
- path => $backupdir ,
73
72
mode => $backupdirmode ,
74
73
owner => $backupdirowner ,
75
74
group => $backupdirgroup ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class { 'mysql::server': }
15
15
let ( :default_params ) do
16
16
{ 'backupuser' => 'testuser' ,
17
17
'backuppassword' => 'testpass' ,
18
- 'backupdir' => '/tmp' ,
18
+ 'backupdir' => '/tmp/mysql-backup ' ,
19
19
'backuprotate' => '25' ,
20
20
'delete_before_dump' => true ,
21
21
'execpath' => '/usr/bin:/usr/sbin:/bin:/sbin:/opt/zimbra/bin' ,
@@ -65,8 +65,7 @@ class { 'mysql::server': }
65
65
}
66
66
67
67
it {
68
- is_expected . to contain_file ( 'mysqlbackupdir' ) . with (
69
- path : '/tmp' ,
68
+ is_expected . to contain_file ( '/tmp/mysql-backup' ) . with (
70
69
ensure : 'directory' ,
71
70
)
72
71
}
@@ -113,9 +112,10 @@ class { 'mysql::server': }
113
112
end
114
113
115
114
it {
116
- is_expected . to contain_file ( 'mysqlbackupdir' ) . with (
117
- path : '/tmp' , ensure : 'directory' ,
118
- mode : '0750' , owner : 'testuser' ,
115
+ is_expected . to contain_file ( '/tmp/mysql-backup' ) . with (
116
+ ensure : 'directory' ,
117
+ mode : '0750' ,
118
+ owner : 'testuser' ,
119
119
group : 'testgrp'
120
120
)
121
121
}
You can’t perform that action at this time.
0 commit comments