Merge 73b9e4c430
into e838611fdd
This commit is contained in:
commit
13ee0d7949
15 changed files with 8 additions and 40 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"fmt"
|
||||||
is "github.com/containers/image/storage"
|
is "github.com/containers/image/storage"
|
||||||
"github.com/containers/storage"
|
"github.com/containers/storage"
|
||||||
"github.com/fatih/camelcase"
|
"github.com/fatih/camelcase"
|
||||||
|
@ -93,6 +94,10 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) {
|
||||||
if c.GlobalIsSet("runtime") {
|
if c.GlobalIsSet("runtime") {
|
||||||
config.Runtime = c.GlobalString("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
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,9 @@ PIDS_LIMIT=${PIDS_LIMIT:-1024}
|
||||||
LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1}
|
LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1}
|
||||||
|
|
||||||
TESTDIR=$(mktemp -d)
|
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
|
# kpod pull needs a configuration file for shortname pulls
|
||||||
export REGISTRIES_CONFIG_PATH="$INTEGRATION_ROOT/registries.conf"
|
export REGISTRIES_CONFIG_PATH="$INTEGRATION_ROOT/registries.conf"
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="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,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
|
|
||||||
|
|
||||||
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}"
|
|
||||||
|
|
||||||
|
|
||||||
@test "kpod export output flag" {
|
@test "kpod export output flag" {
|
||||||
start_crio
|
start_crio
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -7,9 +7,6 @@ function teardown() {
|
||||||
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}"
|
|
||||||
|
|
||||||
@test "mount" {
|
@test "mount" {
|
||||||
start_crio
|
start_crio
|
||||||
|
|
|
@ -3,9 +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}"
|
|
||||||
|
|
||||||
@test "kpod ps with no containers" {
|
@test "kpod ps with no containers" {
|
||||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} ps
|
run ${KPOD_BINARY} ${KPOD_OPTIONS} ps
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT ${STORAGE_OPTS}"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -3,9 +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"
|
|
||||||
NEW_NAME="rename-test"
|
NEW_NAME="rename-test"
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
IMAGE="alpine:latest"
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT $STORAGE_OPTS"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
ROOT="$TESTDIR/crio"
|
|
||||||
RUNROOT="$TESTDIR/crio-run"
|
|
||||||
KPOD_OPTIONS="--root $ROOT --runroot $RUNROOT --storage-driver vfs"
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue