diff --git a/Makefile b/Makefile index c27c150..577fb37 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ GOTEST=$(GOCMD) test GOLINT=golangci-lint run GOFMT=$(GOCMD) fmt GOVET=$(GOCMD) vet +CURRENT_DIR=$(shell pwd) # Binary name BINARY_NAME=tkn-graph @@ -24,7 +25,7 @@ build: ## build the binary # Test targets .PHONY: test test: ## run tests - $(GOTEST) -v -coverprofile=coverage.out ./... + KUBECONFIG=${CURRENT_DIR}/hack/kubeconfig-stub.yaml $(GOTEST) -v -coverprofile=coverage.out ./... # Lint targets .PHONY: lint diff --git a/hack/kubeconfig-stub.yaml b/hack/kubeconfig-stub.yaml new file mode 100644 index 0000000..2afbc57 --- /dev/null +++ b/hack/kubeconfig-stub.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Config +clusters: + - cluster: + server: https://1.2.3.4 + name: mock +contexts: + - context: + cluster: mock + namespace: default + name: mock-ctx +current-context: mock-ctx