You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/28 09:23:03 UTC

[GitHub] [couchdb-helm] willholley commented on a change in pull request #1: Add e2e tests

willholley commented on a change in pull request #1: Add e2e tests
URL: https://github.com/apache/couchdb-helm/pull/1#discussion_r339463007
 
 

 ##########
 File path: test/e2e-kind.sh
 ##########
 @@ -0,0 +1,100 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+readonly CT_VERSION=v2.3.3
+readonly KIND_VERSION=v0.5.1
+readonly CLUSTER_NAME=chart-testing
+readonly K8S_VERSION=v1.14.3
+
+run_ct_container() {
+    echo 'Running ct container...'
+    docker run --rm --interactive --detach --network host --name ct \
+        --volume "$(pwd)/test/ct.yaml:/etc/ct/ct.yaml" \
+        --volume "$(pwd):/workdir" \
+        --workdir /workdir \
+        "quay.io/helmpack/chart-testing:$CT_VERSION" \
+        cat
+    echo
+}
+
+cleanup() {
+    echo 'Removing ct container...'
+    docker kill ct > /dev/null 2>&1
+
+    kind delete cluster --name "$CLUSTER_NAME" || true
+
+    echo 'Done!'
+}
+
+docker_exec() {
+    docker exec --interactive ct "$@"
+}
+
+create_kind_cluster() {
+    if ! [ -x "$(command -v kind)" ]; then
+        echo 'Installing kind...'
+
+        curl -sSLo kind "https://github.com/kubernetes-sigs/kind/releases/download/$KIND_VERSION/kind-linux-amd64"
+        chmod +x kind
+        sudo mv kind /usr/local/bin/kind
+    fi
 
 Review comment:
   ah yes - this was left in with an eye on Jenkins but I can just install kind explicitly in the Jenkins job.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services