-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to sig-proxy for podman-remote
Signed-off-by: Boaz Shuster <[email protected]>
- Loading branch information
Showing
10 changed files
with
179 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helpers | ||
|
||
@test "podman sigkill" { | ||
$PODMAN run -i --name foo $IMAGE sh -c 'trap "echo BYE;exit 0" INT;echo READY;while :;do sleep 0.1;done' & | ||
local kidpid=$! | ||
|
||
# Wait for container to appear | ||
local timeout=5 | ||
while :;do | ||
sleep 0.5 | ||
run_podman '?' container exists foo | ||
if [[ $status -eq 0 ]]; then | ||
break | ||
fi | ||
timeout=$((timeout - 1)) | ||
if [[ $timeout -eq 0 ]]; then | ||
die "Timed out waiting for container to start" | ||
fi | ||
done | ||
|
||
wait_for_ready foo | ||
|
||
# Signal, and wait for container to exit | ||
kill -INT $kidpid | ||
local timeout=5 | ||
while :;do | ||
sleep 0.5 | ||
run_podman logs foo | ||
if [[ "$output" =~ BYE ]]; then | ||
break | ||
fi | ||
timeout=$((timeout - 1)) | ||
if [[ $timeout -eq 0 ]]; then | ||
die "Timed out waiting for BYE from container" | ||
fi | ||
done | ||
|
||
run_podman rm -f -t0 foo | ||
} | ||
|
||
# vim: filetype=sh |