Skip to content

Commit

Permalink
conditional makefile around bats test + temp debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenpip3 committed Mar 16, 2023
1 parent 838742f commit 2678282
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,17 @@ kind-delete: ## Delete kind cluster

.PHONY: bats-tests
IMAGE_NAME := quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-amd64
BUILD_PRESENT := $(shell docker images |grep -q ${IMAGE_NAME})
ifndef BUILD_PRESENT
bats-tests: container-runtime-build-amd64 ## Run bats tests
@echo "+ $@"
kind load docker-image ${IMAGE_NAME} --name $(KIND_CLUSTER_NAME)
OPERATOR_IMAGE="${IMAGE_NAME}" TERM=xterm bats -T -p --show-output-of-passing-tests test/bats
OPERATOR_IMAGE="${IMAGE_NAME}" TERM=xterm bats -T -p -x --show-output-of-passing-tests test/bats
else
bats-tests: ## Run bats tests
@echo "+ $@"
OPERATOR_IMAGE="${IMAGE_NAME}" TERM=xterm bats -T -p -x --show-output-of-passing-tests test/bats
endif

.PHONY: crc-start
crc-start: check-crc ## Start CodeReady Containers Kubernetes cluster
Expand Down

0 comments on commit 2678282

Please sign in to comment.