File tree 3 files changed +5
-15
lines changed
3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 140
140
timeout => $exec_timeout ,
141
141
logoutput => true ,
142
142
}
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' {
154
144
exec { $image_install:
155
145
unless => $_image_find,
156
146
environment => $exec_environment ,
Original file line number Diff line number Diff line change 134
134
135
135
context 'with ensure => latest' do
136
136
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" ) }
138
138
end
139
139
140
140
context 'with ensure => latest and image_tag => precise' do
141
141
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" ) }
143
143
end
144
144
145
145
context 'with ensure => latest and image_digest => sha256:deadbeef' do
146
146
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" ) }
148
148
end
149
149
150
150
context 'with an invalid image name' do
Original file line number Diff line number Diff line change 44
44
45
45
context 'with ensure => latest' do
46
46
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" ) }
48
48
end
49
49
50
50
end
You can’t perform that action at this time.
0 commit comments