commit
fe69289566
23 changed files with 5197 additions and 9 deletions
|
@ -99,7 +99,7 @@ CRIO_CNI_PLUGIN=${CRIO_CNI_PLUGIN:-/opt/cni/bin/}
|
|||
POD_CIDR="10.88.0.0/16"
|
||||
POD_CIDR_MASK="10.88.*.*"
|
||||
|
||||
KPOD_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY}"
|
||||
KPOD_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY} --conmon ${CONMON_BINARY}"
|
||||
|
||||
cp "$CONMON_BINARY" "$TESTDIR/conmon"
|
||||
|
||||
|
|
24
test/kpod_create.bats
Normal file
24
test/kpod_create.bats
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
function teardown() {
|
||||
cleanup_test
|
||||
}
|
||||
|
||||
ALPINE="docker.io/library/alpine:latest"
|
||||
|
||||
@test "create a container based on local image" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull docker.io/library/busybox:latest
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} create docker.io/library/busybox:latest ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "create a container based on a remote image" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} create ${ALPINE} ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
20
test/kpod_run.bats
Normal file
20
test/kpod_run.bats
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
ALPINE="docker.io/library/alpine:latest"
|
||||
|
||||
@test "run a container based on local image" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull docker.io/library/busybox:latest
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} run docker.io/library/busybox:latest ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "run a container based on a remote image" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue