|
63 | 63 |
|
64 | 64 | it 'stops a container' do
|
65 | 65 | expect(Excon).to receive(:post).
|
66 |
| - with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", {read_timeout: 300}). |
| 66 | + with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", {read_timeout: 420}). |
67 | 67 | and_return(double(status: 204))
|
68 | 68 | api.stop_container('12345', 300)
|
69 | 69 | end
|
70 | 70 |
|
71 | 71 | it 'stops a container with a custom timeout' do
|
72 | 72 | expect(Excon).to receive(:post).
|
73 |
| - with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", {read_timeout: 30}). |
| 73 | + with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", {read_timeout: 150}). |
74 | 74 | and_return(double(status: 204))
|
75 | 75 | api.stop_container('12345')
|
76 | 76 | end
|
77 | 77 |
|
78 | 78 | it 'restarts a container' do
|
79 | 79 | expect(Excon).to receive(:post).
|
80 |
| - with(excon_uri + "v1.12" + "/containers/12345/restart?t=30", {}). |
| 80 | + with(excon_uri + "v1.12" + "/containers/12345/restart?t=30", |
| 81 | + {read_timeout: 150}). |
81 | 82 | and_return(double(body: json_string, status: 204))
|
82 | 83 | api.restart_container('12345')
|
83 | 84 | end
|
84 | 85 |
|
85 | 86 | it 'restarts a container with a custom timeout' do
|
86 | 87 | expect(Excon).to receive(:post).
|
87 |
| - with(excon_uri + "v1.12" + "/containers/12345/restart?t=300", {}). |
| 88 | + with(excon_uri + "v1.12" + "/containers/12345/restart?t=300", {:read_timeout=>420}). |
88 | 89 | and_return(double(body: json_string, status: 204))
|
89 | 90 | api.restart_container('12345', 300)
|
90 | 91 | end
|
|
179 | 180 | with(excon_uri + "v1.12" + "/containers/12345/stop?t=300",
|
180 | 181 | client_cert: '/certs/cert.pem',
|
181 | 182 | client_key: '/certs/key.pem',
|
182 |
| - read_timeout: 300). |
| 183 | + read_timeout: 420). |
183 | 184 | and_return(double(status: 204))
|
184 | 185 | api.stop_container('12345', 300)
|
185 | 186 | end
|
|
189 | 190 | with(excon_uri + "v1.12" + "/containers/12345/stop?t=30",
|
190 | 191 | client_cert: '/certs/cert.pem',
|
191 | 192 | client_key: '/certs/key.pem',
|
192 |
| - read_timeout: 30). |
| 193 | + read_timeout: 150). |
193 | 194 | and_return(double(status: 204))
|
194 | 195 | api.stop_container('12345')
|
195 | 196 | end
|
|
198 | 199 | expect(Excon).to receive(:post).
|
199 | 200 | with(excon_uri + "v1.12" + "/containers/12345/restart?t=30",
|
200 | 201 | client_cert: '/certs/cert.pem',
|
201 |
| - client_key: '/certs/key.pem'). |
| 202 | + client_key: '/certs/key.pem', |
| 203 | + read_timeout: 150). |
202 | 204 | and_return(double(body: json_string, status: 204))
|
203 | 205 | api.restart_container('12345')
|
204 | 206 | end
|
|
207 | 209 | expect(Excon).to receive(:post).
|
208 | 210 | with(excon_uri + "v1.12" + "/containers/12345/restart?t=300",
|
209 | 211 | client_cert: '/certs/cert.pem',
|
210 |
| - client_key: '/certs/key.pem'). |
| 212 | + client_key: '/certs/key.pem', |
| 213 | + read_timeout: 420). |
211 | 214 | and_return(double(body: json_string, status: 204))
|
212 | 215 | api.restart_container('12345', 300)
|
213 | 216 | end
|
|
0 commit comments