|
7 | 7 |
|
8 | 8 | // Simulate the command sequence from StopProxy |
9 | 9 | $commands = [ |
10 | | - 'docker stop --time=30 coolify-proxy 2>/dev/null || true', |
| 10 | + 'docker stop -t 30 coolify-proxy 2>/dev/null || true', |
11 | 11 | 'docker rm -f coolify-proxy 2>/dev/null || true', |
12 | 12 | '# Wait for container to be fully removed', |
13 | 13 | 'for i in {1..10}; do', |
|
21 | 21 | $commandsString = implode("\n", $commands); |
22 | 22 |
|
23 | 23 | // Verify the stop sequence includes all required components |
24 | | - expect($commandsString)->toContain('docker stop --time=30 coolify-proxy') |
| 24 | + expect($commandsString)->toContain('docker stop -t 30 coolify-proxy') |
25 | 25 | ->and($commandsString)->toContain('docker rm -f coolify-proxy') |
26 | 26 | ->and($commandsString)->toContain('for i in {1..10}; do') |
27 | 27 | ->and($commandsString)->toContain('if ! docker ps -a --format "{{.Names}}" | grep -q "^coolify-proxy$"') |
|
41 | 41 | // Test that stop/remove commands suppress errors gracefully |
42 | 42 |
|
43 | 43 | $commands = [ |
44 | | - 'docker stop --time=30 coolify-proxy 2>/dev/null || true', |
| 44 | + 'docker stop -t 30 coolify-proxy 2>/dev/null || true', |
45 | 45 | 'docker rm -f coolify-proxy 2>/dev/null || true', |
46 | 46 | ]; |
47 | 47 |
|
|
54 | 54 | // Verify that stop command includes the timeout parameter |
55 | 55 |
|
56 | 56 | $timeout = 30; |
57 | | - $stopCommand = "docker stop --time=$timeout coolify-proxy 2>/dev/null || true"; |
| 57 | + $stopCommand = "docker stop -t $timeout coolify-proxy 2>/dev/null || true"; |
58 | 58 |
|
59 | | - expect($stopCommand)->toContain('--time=30'); |
| 59 | + expect($stopCommand)->toContain('-t 30'); |
60 | 60 | }); |
61 | 61 |
|
62 | 62 | it('waits for swarm service container removal correctly', function () { |
|
0 commit comments