Skip to content

Commit

Permalink
test: Add fake kubeconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Sergiy Kulanov <[email protected]>
  • Loading branch information
SergK committed Oct 12, 2023
1 parent a15b4ce commit 8f02cd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions hack/kubeconfig-stub.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8f02cd6

Please sign in to comment.