Skip to content

Commit

Permalink
makefile : Add Target to run e2e Test (#685)
Browse files Browse the repository at this point in the history
* makefile targets for e2e

Signed-off-by: Shubham Gupta <[email protected]>

* fix

Signed-off-by: Shubham Gupta <[email protected]>

---------

Signed-off-by: Shubham Gupta <[email protected]>
  • Loading branch information
shubham-cmyk authored Oct 29, 2023
1 parent 89c2daa commit f7e6a28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,20 @@ verify-codegen: codegen
@git --no-pager diff -- .
@echo 'If this test fails, it is because the git diff is non-empty after running "make codegen".' >&2
@echo 'To correct this, locally run "make codegen", commit the changes, and re-run tests.' >&2
@git diff --quiet --exit-code -- .
@git diff --quiet --exit-code -- .

.PHONY: install-kuttl
install-kuttl:
curl -L https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 -o $(shell pwd)/bin/kuttl
chmod +x $(shell pwd)/bin/kuttl

.PHONY: e2e-kind-setup
e2e-kind-setup:
docker build -t redis-operator:e2e -f Dockerfile .
kind create cluster --config tests/_config/kind-config.yaml
kind load docker-image redis-operator:e2e --name kind
make deploy IMG=redis-operator:e2e

.PHONY: e2e-test
e2e-test: e2e-kind-setup install-kuttl
$(shell pwd)/bin/kuttl test --config tests/_config/kuttl-test.yaml
1 change: 1 addition & 0 deletions tests/_config/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: kind
nodes:
- role: control-plane
- role: worker
Expand Down

0 comments on commit f7e6a28

Please sign in to comment.