Skip to content

Commit

Permalink
E2E test setup using kuttl
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkacz committed Dec 31, 2020
1 parent 3caa9a2 commit 3f446f2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ test:

.PHONY: build
build:
go build -race -o ./bin/cm-verifier cmd/ctl/main.go
go build -race -o ./bin/cm-verifier cmd/ctl/main.go

.PHONY: e2e-test
e2e-test:
./hack/run-e2e-tests.sh
18 changes: 18 additions & 0 deletions hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

KUTTL_VERSION="0.7.2"

if [[ "$(uname)" == "Darwin" ]]; then
curl -L https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION}/kubectl-kuttl_${KUTTL_VERSION}_darwin_x86_64 --output kuttl
elif [[ "$(expr substr $(uname -s) 1 5)" == "Linux" ]]; then
curl -L https://github.com/kudobuilder/kudo/releases/download/v${KUTTL_VERSION}/kubectl-kuttl_${KUTTL_VERSION}_linux_x86_64 --output kuttl
fi

chmod +x kuttl

./kuttl test --config test/e2e/e2e-test.yaml
8 changes: 8 additions & 0 deletions test/e2e/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./test/e2e
startKIND: true
timeout: 300
parallel: 1
artifactsDir: reports/kind-logs

0 comments on commit 3f446f2

Please sign in to comment.