2016-09-23 17:02:53 +08:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load helpers
|
|
|
|
|
|
|
|
function setup() {
|
|
|
|
teardown_busybox
|
|
|
|
setup_busybox
|
|
|
|
}
|
|
|
|
|
|
|
|
function teardown() {
|
|
|
|
teardown_busybox
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "runc start" {
|
2017-03-08 10:02:39 +08:00
|
|
|
runc create --console-socket $CONSOLE_SOCKET test_busybox
|
2016-09-23 17:02:53 +08:00
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
2017-03-08 10:02:39 +08:00
|
|
|
testcontainer test_busybox created
|
2016-09-23 17:02:53 +08:00
|
|
|
|
2017-03-08 10:02:39 +08:00
|
|
|
# start container test_busybox
|
|
|
|
runc start test_busybox
|
2016-09-23 17:02:53 +08:00
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
2017-03-08 10:02:39 +08:00
|
|
|
testcontainer test_busybox running
|
2016-09-23 17:02:53 +08:00
|
|
|
|
2017-03-08 10:02:39 +08:00
|
|
|
# delete test_busybox
|
|
|
|
runc delete --force test_busybox
|
2016-09-23 17:02:53 +08:00
|
|
|
|
2017-03-08 10:02:39 +08:00
|
|
|
runc state test_busybox
|
2016-09-23 17:02:53 +08:00
|
|
|
[ "$status" -ne 0 ]
|
|
|
|
}
|