forked from barak/tarpoon
Add glide.yaml and vendor deps
This commit is contained in:
parent
db918f12ad
commit
5b3d5e81bd
18880 changed files with 5166045 additions and 1 deletions
87
vendor/github.com/opencontainers/runc/tests/integration/create.bats
generated
vendored
Normal file
87
vendor/github.com/opencontainers/runc/tests/integration/create.bats
generated
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
function setup() {
|
||||
teardown_busybox
|
||||
setup_busybox
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
teardown_busybox
|
||||
}
|
||||
|
||||
@test "runc create" {
|
||||
runc create --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
# start the command
|
||||
runc start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@test "runc create exec" {
|
||||
runc create --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
runc exec test_busybox true
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# start the command
|
||||
runc start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@test "runc create --pid-file" {
|
||||
runc create --pid-file pid.txt --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
# check pid.txt was generated
|
||||
[ -e pid.txt ]
|
||||
|
||||
run cat pid.txt
|
||||
[ "$status" -eq 0 ]
|
||||
[[ ${lines[0]} == $(__runc state test_busybox | jq '.pid') ]]
|
||||
|
||||
# start the command
|
||||
runc start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@test "runc create --pid-file with new CWD" {
|
||||
# create pid_file directory as the CWD
|
||||
run mkdir pid_file
|
||||
[ "$status" -eq 0 ]
|
||||
run cd pid_file
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
runc create --pid-file pid.txt -b $BUSYBOX_BUNDLE --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
# check pid.txt was generated
|
||||
[ -e pid.txt ]
|
||||
|
||||
run cat pid.txt
|
||||
[ "$status" -eq 0 ]
|
||||
[[ ${lines[0]} == $(__runc state test_busybox | jq '.pid') ]]
|
||||
|
||||
# start the command
|
||||
runc start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue