|
55 | 55 | let(:params) { { ensure: 'absent', image: 'image:test' } } |
56 | 56 |
|
57 | 57 | it do |
58 | | - is_expected.to contain_exec('pull_image_title').only_with( |
| 58 | + is_expected.to contain_exec('remove_image_title').only_with( |
59 | 59 | { |
60 | | - 'command' => 'podman image pull image:test', |
61 | | - 'unless' => 'podman rmi image:test', |
| 60 | + 'command' => 'podman rmi image:test', |
| 61 | + 'onlyif' => 'podman image exists image:test', |
62 | 62 | 'path' => '/sbin:/usr/sbin:/bin:/usr/bin', |
63 | 63 | 'environment' => [], |
64 | 64 | }, |
|
84 | 84 | it { is_expected.to contain_podman__rootless('dummy').only_with({}) } |
85 | 85 |
|
86 | 86 | it do |
87 | | - is_expected.to contain_exec('pull_image_title').only_with( |
| 87 | + is_expected.to contain_exec('remove_image_title').only_with( |
88 | 88 | { |
89 | | - 'command' => 'podman image pull image:test', |
90 | | - 'unless' => 'podman rmi image:test', |
| 89 | + 'command' => 'podman rmi image:test', |
| 90 | + 'onlyif' => 'podman image exists image:test', |
91 | 91 | 'path' => '/sbin:/usr/sbin:/bin:/usr/bin', |
92 | 92 | 'environment' => ['HOME=/home/dummy', 'XDG_RUNTIME_DIR=/run/user/3333', 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/3333/bus'], |
93 | 93 | 'cwd' => '/home/dummy', |
|
156 | 156 | let(:params) { { flags: { publish: ['242:242'], volume: 'jenkins:/test/ing' }, ensure: 'absent', image: 'image:test' } } |
157 | 157 |
|
158 | 158 | it do |
159 | | - is_expected.to contain_exec('pull_image_title').with( |
| 159 | + is_expected.to contain_exec('remove_image_title').with( |
160 | 160 | { |
161 | | - 'command' => "podman image pull --publish '242:242' --volume 'jenkins:/test/ing' image:test", |
| 161 | + 'command' => 'podman rmi image:test', |
162 | 162 | }, |
163 | 163 | ) |
164 | 164 | end |
|
223 | 223 | it { is_expected.to contain_podman__rootless('testing').only_with({}) } |
224 | 224 |
|
225 | 225 | it do |
226 | | - is_expected.to contain_exec('pull_image_title').only_with( |
| 226 | + is_expected.to contain_exec('remove_image_title').only_with( |
227 | 227 | { |
228 | | - 'command' => 'podman image pull image:test', |
229 | | - 'unless' => 'podman rmi image:test', |
| 228 | + 'command' => 'podman rmi image:test', |
| 229 | + 'onlyif' => 'podman image exists image:test', |
230 | 230 | 'path' => '/sbin:/usr/sbin:/bin:/usr/bin', |
231 | 231 | 'environment' => ['HOME=/home/testing', 'XDG_RUNTIME_DIR=/run/user/3333', 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/3333/bus'], |
232 | 232 | 'cwd' => '/home/testing', |
|
0 commit comments