...
1#!/usr/bin/env bats
2
3load helpers
4
5function setup() {
6 setup_busybox
7}
8
9function teardown() {
10 teardown_bundle
11}
12
13@test "kill detached busybox" {
14 # run busybox detached
15 runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
16 [ "$status" -eq 0 ]
17
18 # check state
19 testcontainer test_busybox running
20
21 runc kill test_busybox KILL
22 [ "$status" -eq 0 ]
23 wait_for_container 10 1 test_busybox stopped
24
25 # we should ensure kill work after the container stopped
26 runc kill -a test_busybox 0
27 [ "$status" -eq 0 ]
28
29 runc delete test_busybox
30 [ "$status" -eq 0 ]
31}
View as plain text