File tree Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 101101    mode     => ' 0600'  ,
102102  }
103103
104-   file  { 'mysqlbackupdir' :
104+   file  { $backupdir :
105105    ensure  => ' directory'  ,
106-     path    => $backupdir ,
107106    mode    => $backupdirmode ,
108107    owner   => $backupdirowner ,
109108    group   => $backupdirgroup ,
110109  }
111- 
112110}
Original file line number Diff line number Diff line change 7070    content  => template (' mysql/mysqlbackup.sh.erb'  ),
7171  }
7272
73-   file  { 'mysqlbackupdir' :
73+   file  { $backupdir :
7474    ensure  => ' directory'  ,
75-     path    => $backupdir ,
7675    mode    => $backupdirmode ,
7776    owner   => $backupdirowner ,
7877    group   => $backupdirgroup ,
7978  }
80- 
8179}
Original file line number Diff line number Diff line change 6767    require  => Package[$xtrabackup_package_name ],
6868  }
6969
70-   file  { 'mysqlbackupdir' :
70+   file  { $backupdir :
7171    ensure  => ' directory'  ,
72-     path    => $backupdir ,
7372    mode    => $backupdirmode ,
7473    owner   => $backupdirowner ,
7574    group   => $backupdirgroup ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class { 'mysql::server': }
1515      let ( :default_params )  do 
1616        {  'backupuser'          =>  'testuser' , 
1717          'backuppassword'      =>  'testpass' , 
18-           'backupdir'           =>  '/tmp' , 
18+           'backupdir'           =>  '/tmp/mysql-backup ' , 
1919          'backuprotate'        =>  '25' , 
2020          'delete_before_dump'  =>  true , 
2121          'execpath'            =>  '/usr/bin:/usr/sbin:/bin:/sbin:/opt/zimbra/bin' , 
@@ -65,8 +65,7 @@ class { 'mysql::server': }
6565        } 
6666
6767        it  { 
68-           is_expected . to  contain_file ( 'mysqlbackupdir' ) . with ( 
69-             path : '/tmp' , 
68+           is_expected . to  contain_file ( '/tmp/mysql-backup' ) . with ( 
7069            ensure : 'directory' , 
7170          ) 
7271        } 
@@ -113,9 +112,10 @@ class { 'mysql::server': }
113112        end 
114113
115114        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' , 
119119            group : 'testgrp' 
120120          ) 
121121        } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments