diff --git a/hack/lib.sh b/hack/lib.sh index 77793844d0..3330541ad6 100644 --- a/hack/lib.sh +++ b/hack/lib.sh @@ -153,6 +153,17 @@ function hack::wait_for_success() { return 1 } +# +# Concatenates the elements with an separator between them. +# +# Usage: hack::join ',' a b c +# +function hack::join() { + local IFS="$1" + shift + echo "$*" +} + function hack::__verify_kubetest2() { local n="$1" local v="$2" diff --git a/hack/run-e2e.sh b/hack/run-e2e.sh index 3f207093e0..a2be877399 100755 --- a/hack/run-e2e.sh +++ b/hack/run-e2e.sh @@ -214,9 +214,10 @@ function e2e::image_load() { $E2E_IMAGE ) if [ "$PROVIDER" == "kind" ]; then + local nodes=$($KIND_BIN get nodes --name $CLUSTER | grep -v 'control-plane$') echo "info: load images ${images[@]}" for n in ${images[@]}; do - $KIND_BIN load docker-image --name $CLUSTER $n + $KIND_BIN load docker-image --name $CLUSTER $n --nodes $(hack::join ',' ${nodes[@]}) done elif [ "$PROVIDER" == "gke" ]; then unset DOCKER_CONFIG # We don't need this and it may be read-only and fail the command to fail diff --git a/tests/images/test-apiserver/Dockerfile b/tests/images/test-apiserver/Dockerfile deleted file mode 100644 index 98222bfd8e..0000000000 --- a/tests/images/test-apiserver/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine:3.10 - -ADD bin/tidb-apiserver /usr/local/bin/tidb-apiserver