test: fix and add tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
f7d3f7a69a
commit
3ddf3f21c1
7 changed files with 30 additions and 2 deletions
28
test/pod.bats
Normal file
28
test/pod.bats
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
function teardown() {
|
||||
stop_ocid
|
||||
cleanup_test
|
||||
}
|
||||
|
||||
# PR#59
|
||||
@test "pod release name on remove" {
|
||||
skip "cannot be run in a container yet"
|
||||
|
||||
start_ocid
|
||||
run ocic pod create --config "$TESTDATA"/sandbox_config.json
|
||||
[ "$status" -eq 0 ]
|
||||
id="$output"
|
||||
run ocic pod stop --id "$id"
|
||||
[ "$status" -eq 0 ]
|
||||
sleep 5 # FIXME: there's a race between container kill and delete below
|
||||
run ocic pod remove --id "$id"
|
||||
[ "$status" -eq 0 ]
|
||||
run ocic pod create --config "$TESTDATA"/sandbox_config.json
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# TODO: cleanup all the stuff from runc, meaning list pods and stop remove them
|
||||
# pod list + pod stop + pod remove in cleanup
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue