diff --git a/Dockerfile b/Dockerfile index 693ed793..dc9a2d10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY . . RUN make build && bin/k3d version FROM docker:19.03-dind as dind -RUN apk add bash curl sudo jq git make +RUN apk update && apk add bash curl sudo jq git make netcat-openbsd RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin/kubectl diff --git a/tests/test_full_lifecycle.sh b/tests/test_full_lifecycle.sh index 8b182618..e9724895 100755 --- a/tests/test_full_lifecycle.sh +++ b/tests/test_full_lifecycle.sh @@ -46,11 +46,18 @@ info "Checking that we have 3 nodes available now..." check_multi_node "$clustername" 3 || failed "failed to verify number of nodes" # 4. load an image into the cluster -info "Loading an image into the cluster..." +info "Importing an image into the cluster..." docker pull nginx:latest > /dev/null docker tag nginx:latest nginx:local > /dev/null $EXE image import nginx:local -c $clustername || failed "could not import image in $clustername" +# 5. use that image +info "Spawning a pod using the imported image..." +kubectl run --image nginx:local testimage +info "Waiting for a bit for the pod to start..." +sleep 5 +kubectl get pod testimage | grep 'Running' || failed "Pod using the imported image is not running after 5 seconds" + # Cleanup info "Deleting cluster $clustername..."