Skip to content

Commit 850b9c0

Browse files
authored
Merge pull request #1132 from datawolf/add-integration-test-for-create
add test cases for create command
2 parents d15661d + 596a4c3 commit 850b9c0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/integration/create.bats

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,23 @@ function teardown() {
3939

4040
testcontainer test_busybox running
4141
}
42+
43+
@test "runc create --pid-file" {
44+
runc create --pid-file pid.txt --console /dev/pts/ptmx test_busybox
45+
[ "$status" -eq 0 ]
46+
47+
testcontainer test_busybox created
48+
49+
# check pid.txt was generated
50+
[ -e pid.txt ]
51+
52+
run cat pid.txt
53+
[ "$status" -eq 0 ]
54+
[[ ${lines[0]} =~ [0-9]+ ]]
55+
56+
# start the command
57+
runc start test_busybox
58+
[ "$status" -eq 0 ]
59+
60+
testcontainer test_busybox running
61+
}

0 commit comments

Comments
 (0)