github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/tests/integration/start.bats (about) 1 #!/usr/bin/env bats 2 3 load helpers 4 5 function setup() { 6 teardown_busybox 7 setup_busybox 8 } 9 10 function teardown() { 11 teardown_busybox 12 } 13 14 @test "runc start" { 15 runc create --console /dev/pts/ptmx test_busybox1 16 [ "$status" -eq 0 ] 17 18 testcontainer test_busybox1 created 19 20 runc create --console /dev/pts/ptmx test_busybox2 21 [ "$status" -eq 0 ] 22 23 testcontainer test_busybox2 created 24 25 26 # start container test_busybox1 and test_busybox2 27 runc start test_busybox1 test_busybox2 28 [ "$status" -eq 0 ] 29 30 testcontainer test_busybox1 running 31 testcontainer test_busybox2 running 32 33 # delete test_busybox1 and test_busybox2 34 runc delete --force test_busybox1 test_busybox2 35 36 runc state test_busybox1 37 [ "$status" -ne 0 ] 38 39 runc state test_busybox2 40 [ "$status" -ne 0 ] 41 }