mirror of
https://github.com/docker/cli.git
synced 2025-09-02 10:21:16 +03:00
get e2e working with notary service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
committed by
Riyaz Faizullabhoy
parent
6e3bafd06b
commit
ade675d36c
@@ -33,12 +33,14 @@ function is_swarm_enabled {
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose down >&2
|
||||
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose down -v >&2
|
||||
}
|
||||
|
||||
function runtests {
|
||||
local engine_host=$1
|
||||
|
||||
# TODO: only run if inside a container
|
||||
update-ca-certificates
|
||||
# shellcheck disable=SC2086
|
||||
env -i \
|
||||
TEST_DOCKER_HOST="$engine_host" \
|
||||
|
@@ -22,13 +22,23 @@ docker build \
|
||||
-t "$dev_image" \
|
||||
-f dockerfiles/Dockerfile.dev .
|
||||
|
||||
notary_volume="${unique_id}_notary-fixtures"
|
||||
docker volume create "$notary_volume"
|
||||
docker run --rm \
|
||||
-v "$PWD:/go/src/github.com/docker/cli" \
|
||||
-v "$notary_volume:/data" \
|
||||
"$dev_image" \
|
||||
cp -r ./e2e/testdata/notary/* /data/
|
||||
|
||||
engine_host=$(run_in_env setup)
|
||||
testexit=0
|
||||
docker run -i --rm \
|
||||
-v "$PWD:/go/src/github.com/docker/cli" \
|
||||
-v "$PWD/e2e/testdata/notary/root-ca.cert:/usr/local/share/ca-certificates/notary.cert" \
|
||||
--network "${unique_id}_default" \
|
||||
-e TESTFLAGS \
|
||||
"$dev_image" \
|
||||
./scripts/test/e2e/run test "$engine_host" || testexit="$?"
|
||||
|
||||
run_in_env cleanup
|
||||
exit "$testexit"
|
||||
|
Reference in New Issue
Block a user