This commit is contained in:
Brent Baude 2017-09-29 17:46:55 +00:00 committed by GitHub
commit 13ee0d7949
15 changed files with 8 additions and 40 deletions

View file

@ -4,6 +4,7 @@ import (
"os"
"strings"
"fmt"
is "github.com/containers/image/storage"
"github.com/containers/storage"
"github.com/fatih/camelcase"
@ -93,6 +94,10 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) {
if c.GlobalIsSet("runtime") {
config.Runtime = c.GlobalString("runtime")
}
if _, err := os.Stat(config.Runtime); os.IsNotExist(err) {
// path to runtime does not exist
return config, fmt.Errorf("invalid --runtime value %q", err)
}
return config, nil
}

View file

@ -60,6 +60,9 @@ PIDS_LIMIT=${PIDS_LIMIT:-1024}
LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1}
TESTDIR=$(mktemp -d)
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS} --runtime ${RUNTIME_BINARY}"
# kpod pull needs a configuration file for shortname pulls
export REGISTRIES_CONFIG_PATH="$INTEGRATION_ROOT/registries.conf"

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT --storage-driver vfs"
function teardown() {
cleanup_test

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
function teardown() {
cleanup_test

View file

@ -3,10 +3,6 @@
load helpers
IMAGE="redis:alpine"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
@test "kpod export output flag" {
start_crio

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
function teardown() {
cleanup_test

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
function teardown() {
cleanup_test

View file

@ -7,9 +7,6 @@ function teardown() {
load helpers
IMAGE="redis:alpine"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
@test "mount" {
start_crio

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="redis:alpine"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
@test "kpod ps with no containers" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} ps

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
function teardown() {
cleanup_test

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="redis:alpine"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
NEW_NAME="rename-test"
function teardown() {

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS --runtime $RUNTIME_BINARY"
function teardown() {
cleanup_test
}

View file

@ -3,9 +3,6 @@
load helpers
IMAGE="alpine:latest"
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
function teardown() {
cleanup_test

View file

@ -2,9 +2,6 @@
load helpers
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
function teardown() {
cleanup_test

View file

@ -2,9 +2,6 @@
load helpers
ROOT="$TESTDIR/crio"
RUNROOT="$TESTDIR/crio-run"
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT --storage-driver vfs"
function teardown() {
cleanup_test
}