File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 140140      timeout      => $exec_timeout ,
141141      logoutput    => true ,
142142    }
143-   } elsif  $ensure  == ' latest'   or $image_tag  == ' latest'   {
144-     exec  { "echo 'Update of ${image_arg} complete'" :
145-       environment  => $exec_environment ,
146-       path         => $exec_path ,
147-       timeout      => $exec_timeout ,
148-       onlyif       => $image_install ,
149-       require      => File [$update_docker_image_path ],
150-       provider     => $exec_provider ,
151-       logoutput    => true ,
152-     }
153-   } elsif  $ensure  == ' present'   {
143+   } elsif  $ensure  == ' latest'   or $image_tag  == ' latest'   or $ensure  == ' present'   {
154144    exec { $image_install: 
155145      unless       => $_image_find,
156146      environment  => $exec_environment ,
Original file line number Diff line number Diff line change 134134
135135  context  'with ensure => latest'  do 
136136    let ( :params )  {  {  'ensure'  =>  'latest'  }  } 
137-     it  {  should  contain_exec ( "echo 'Update of base complete'"  ) . with_onlyif ( ' /usr/local/bin/update_docker_image.sh base' )  } 
137+     it  {  should  contain_exec ( "/usr/local/bin/update_docker_image.sh base"  )  } 
138138  end 
139139
140140  context  'with ensure => latest and image_tag => precise'  do 
141141    let ( :params )  {  {  'ensure'  =>  'latest' ,  'image_tag'  =>  'precise'  }  } 
142-     it  {  should  contain_exec ( "echo 'Update of  base:precise complete' " )  } 
142+     it  {  should  contain_exec ( "/usr/local/bin/update_docker_image.sh  base:precise" )  } 
143143  end 
144144
145145  context  'with ensure => latest and image_digest => sha256:deadbeef'  do 
146146    let ( :params )  {  {  'ensure'  =>  'latest' ,  'image_digest'  =>  'sha256:deadbeef'  }  } 
147-     it  {  should  contain_exec ( "echo 'Update of  base@sha256:deadbeef complete' " )  } 
147+     it  {  should  contain_exec ( "/usr/local/bin/update_docker_image.sh  base@sha256:deadbeef" )  } 
148148  end 
149149
150150  context  'with an invalid image name'  do 
Original file line number Diff line number Diff line change 4444
4545    context  'with ensure => latest'  do 
4646        let ( :params )  {  {  'ensure'  =>  'latest'  }  } 
47-         it  {  should  contain_exec ( "echo 'Update of base complete'"  ) . with_onlyif ( ' & C:/Windows/Temp/update_docker_image.ps1 base' )  } 
47+         it  {  should  contain_exec ( "& C:/Windows/Temp/update_docker_image.ps1 base"  )  } 
4848    end 
4949
5050end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments