update to use containerd seccomp package

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-03-22 09:02:35 -04:00
parent 9ff5e389ff
commit 09243b740c
8199 changed files with 30742 additions and 1598219 deletions

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -eu -o pipefail
src=alpine@sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d
dest=registry:5000/alpine:3.6
docker pull $src
docker tag $src $dest
docker push $dest

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -eu -o pipefail
src=busybox@sha256:3e8fa85ddfef1af9ca85a5cfb714148956984e02f00bec3f7f49d3925a91e0e7
dest=registry:5000/busybox:1.27.2
docker pull $src
docker tag $src $dest
docker push $dest

View file

@ -1,92 +0,0 @@
#!/usr/bin/env bash
# Run integration tests against the latest docker-ce dind
set -eu -o pipefail
function container_ip {
local cid=$1
local network=$2
docker inspect \
-f "{{.NetworkSettings.Networks.${network}.IPAddress}}" "$cid"
}
function setup {
local project=$1
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose up -d >&2
local network="${project}_default"
# TODO: only run if inside a container
docker network connect "$network" "$(hostname)"
engine_ip="$(container_ip "${project}_engine_1" "$network")"
engine_host="tcp://$engine_ip:2375"
(
export DOCKER_HOST="$engine_host"
timeout -t 200 ./scripts/test/e2e/wait-on-daemon
./scripts/test/e2e/load-alpine
./scripts/test/e2e/load-busybox
is_swarm_enabled || docker swarm init
) >&2
echo "$engine_host"
}
function is_swarm_enabled {
docker info 2> /dev/null | grep -q 'Swarm: active'
}
function cleanup {
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" \
GOPATH="$GOPATH" \
PATH="$PWD/build/" \
"$(which go)" test -v ./e2e/... ${TESTFLAGS-}
}
export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
compose_env_file=./e2e/compose-env.yaml
cmd=${1-}
case "$cmd" in
setup)
setup "$unique_id" "$compose_env_file"
exit
;;
cleanup)
cleanup "$unique_id" "$compose_env_file"
exit
;;
test)
engine_host=${2-}
if [[ -z "${engine_host}" ]]; then
echo "missing parameter docker engine host"
echo "Usage: $0 test ENGINE_HOST"
exit 3
fi
runtests "$engine_host"
;;
run|"")
engine_host="$(setup "$unique_id" "$compose_env_file")"
testexit=0
runtests "$engine_host" || testexit=$?
cleanup "$unique_id" "$compose_env_file"
exit $testexit
;;
shell)
$SHELL
;;
*)
echo "Unknown command: $cmd"
echo "Usage: "
echo " $0 [setup | cleanup | test | run] [engine_host]"
exit 1
;;
esac

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
set -eu -o pipefail
echo "Waiting for docker daemon to become available at $DOCKER_HOST"
while ! docker version > /dev/null; do
sleep 0.3
done
docker version

View file

@ -1,52 +0,0 @@
#!/usr/bin/env bash
# Setup, run and teardown e2e test suite in containers.
set -eu -o pipefail
unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
e2e_env_image=docker-cli-e2e-env:$unique_id
dev_image=docker-cli-dev:$unique_id
function run_in_env {
local cmd=$1
docker run -i --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-e E2E_UNIQUE_ID \
"$e2e_env_image" "$cmd"
}
docker build \
-t "$e2e_env_image" \
-f dockerfiles/Dockerfile.test-e2e-env .
docker build \
-t "$dev_image" \
-f dockerfiles/Dockerfile.dev .
notary_volume="${unique_id}_notary-fixtures"
docker volume create --name "$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
test_cmd="test"
if [[ -n "${TEST_DEBUG-}" ]]; then
test_cmd="shell"
fi
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 \
-e ENGINE_HOST="$engine_host" \
"$dev_image" \
./scripts/test/e2e/run "$test_cmd" "$engine_host" || testexit="$?"
run_in_env cleanup
exit "$testexit"

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
set -eu -o pipefail
go test -v "$@"

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
set -eu -o pipefail
# install test dependencies once before running tests for each package. This
# reduces the runtime from 200s down to 23s
go test -i "$@"
for pkg in "$@"; do
./scripts/test/unit \
-cover \
-coverprofile=profile.out \
-covermode=atomic \
"${pkg}"
if test -f profile.out; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

View file

@ -1,3 +0,0 @@
#!/bin/sh
# shellcheck disable=SC2016
exec filewatcher -L 6 -x build -x script go test -timeout 30s -v './${dir}'