Also refactor setting flags for running kpod
* Remove duplicate definitions of storage-related flags for kpod, since we set them in helpers.bash now, and the other locations that were also setting it were doing so after loading the definitions in helpers. * Set kpod storage flags after checking if we need to force use of the "vfs" storage driver for cri-o, to make sure kpod also ends up with the same override if we're using one. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
e16bb3feb3
commit
2491d38e03
8 changed files with 9 additions and 30 deletions
|
@ -37,4 +37,4 @@ function teardown() {
|
||||||
cleanup_ctrs
|
cleanup_ctrs
|
||||||
cleanup_pods
|
cleanup_pods
|
||||||
stop_crio
|
stop_crio
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,11 +59,6 @@ PIDS_LIMIT=${PIDS_LIMIT:-1024}
|
||||||
# Log size max limit
|
# Log size max limit
|
||||||
LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1}
|
LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1}
|
||||||
|
|
||||||
# Options for kpod.
|
|
||||||
ROOT="${TESTDIR}/crio"
|
|
||||||
RUNROOT="${TESTDIR}/crio-run"
|
|
||||||
KPOD_OPTIONS="--root ${ROOT} --runroot ${RUNROOT} ${STORAGE_OPTS} --runtime ${RUNTIME_BINARY}"
|
|
||||||
|
|
||||||
TESTDIR=$(mktemp -d)
|
TESTDIR=$(mktemp -d)
|
||||||
|
|
||||||
# kpod pull needs a configuration file for shortname pulls
|
# kpod pull needs a configuration file for shortname pulls
|
||||||
|
@ -95,6 +90,8 @@ CRIO_CNI_PLUGIN="/opt/cni/bin/"
|
||||||
POD_CIDR="10.88.0.0/16"
|
POD_CIDR="10.88.0.0/16"
|
||||||
POD_CIDR_MASK="10.88.*.*"
|
POD_CIDR_MASK="10.88.*.*"
|
||||||
|
|
||||||
|
KPOD_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY}"
|
||||||
|
|
||||||
cp "$CONMON_BINARY" "$TESTDIR/conmon"
|
cp "$CONMON_BINARY" "$TESTDIR/conmon"
|
||||||
|
|
||||||
PATH=$PATH:$TESTDIR
|
PATH=$PATH:$TESTDIR
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="redis:alpine"
|
IMAGE="redis:alpine"
|
||||||
ROOT="${TESTDIR}/crio"
|
|
||||||
RUNROOT="${TESTDIR}/crio-run"
|
|
||||||
# Do not add --storage-driver vfs
|
|
||||||
KPOD_OPTIONS="--root ${ROOT} --runroot ${RUNROOT} --runtime ${RUNTIME_BINARY}"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
function teardown() {
|
|
||||||
cleanup_test
|
|
||||||
}
|
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="redis:alpine"
|
IMAGE="redis:alpine"
|
||||||
ROOT="${TESTDIR}/crio"
|
|
||||||
RUNROOT="${TESTDIR}/crio-run"
|
function teardown() {
|
||||||
# Do not add --storage-driver vfs
|
cleanup_test
|
||||||
KPOD_OPTIONS="--root ${ROOT} --runroot ${RUNROOT} --runtime ${RUNTIME_BINARY}"
|
}
|
||||||
|
|
||||||
@test "mount" {
|
@test "mount" {
|
||||||
start_crio
|
start_crio
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="redis:alpine"
|
IMAGE="redis:alpine"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS --runtime $RUNTIME_BINARY"
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ function teardown() {
|
||||||
run ${KPOD_BINARY} $KPOD_OPTIONS pull "$IMAGE"
|
run ${KPOD_BINARY} $KPOD_OPTIONS pull "$IMAGE"
|
||||||
echo "$output"
|
echo "$output"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" containers-storage:[$ROOT]busybox:test
|
run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" containers-storage:[${TESTDIR}/crio]busybox:test
|
||||||
echo "$output"
|
echo "$output"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$IMAGE" busybox:test
|
run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$IMAGE" busybox:test
|
||||||
|
|
|
@ -2,11 +2,7 @@
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
|
|
||||||
IMAGE="docker.io/library/alpine:latest"
|
IMAGE="docker.io/library/alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT --storage-driver vfs"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
|
@ -3,10 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="redis:alpine"
|
IMAGE="redis:alpine"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
|
|
||||||
|
|
||||||
|
|
||||||
# Returns the POD ID
|
# Returns the POD ID
|
||||||
function pod_run_from_template(){
|
function pod_run_from_template(){
|
||||||
|
|
Loading…
Reference in a new issue