Add integration tests for create/start
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
6eba9b8ffb
commit
06fab0f860
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
function setup() {
|
||||
teardown_busybox
|
||||
setup_busybox
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
teardown_busybox
|
||||
}
|
||||
|
||||
@test "runc create" {
|
||||
run "$RUNC" create --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
# start the command
|
||||
run "$RUNC" start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@test "runc create exec" {
|
||||
run "$RUNC" create --console /dev/pts/ptmx test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox created
|
||||
|
||||
run "$RUNC" exec test_busybox true
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# start the command
|
||||
run "$RUNC" start test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
Loading…
Reference in New Issue