|
|
@ -54,7 +54,7 @@ TARGET_OBJS ?= darwin-amd64.tar.gz darwin-amd64.tar.gz.sha256 linux-amd64.tar.gz |
|
|
|
GO ?= go
|
|
|
|
GO ?= go
|
|
|
|
PKG := $(shell go mod vendor)
|
|
|
|
PKG := $(shell go mod vendor)
|
|
|
|
TAGS :=
|
|
|
|
TAGS :=
|
|
|
|
TESTS := .
|
|
|
|
TESTS := ./...
|
|
|
|
TESTFLAGS :=
|
|
|
|
TESTFLAGS :=
|
|
|
|
LDFLAGS := -w -s -X github.com/rancher/k3d/v3/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v3/version.K3sVersion=${K3S_TAG}
|
|
|
|
LDFLAGS := -w -s -X github.com/rancher/k3d/v3/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v3/version.K3sVersion=${K3S_TAG}
|
|
|
|
GCFLAGS :=
|
|
|
|
GCFLAGS :=
|
|
|
@ -151,6 +151,9 @@ check: check-fmt lint |
|
|
|
########## Tests ##########
|
|
|
|
########## Tests ##########
|
|
|
|
###########################
|
|
|
|
###########################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test: |
|
|
|
|
|
|
|
$(GO) test $(TESTS) $(TESTFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
e2e: build-docker-dind |
|
|
|
e2e: build-docker-dind |
|
|
|
@echo "Running e2e tests in k3d:$(K3D_IMAGE_TAG)"
|
|
|
|
@echo "Running e2e tests in k3d:$(K3D_IMAGE_TAG)"
|
|
|
|
LOG_LEVEL="$(E2E_LOG_LEVEL)" E2E_SKIP="$(E2E_SKIP)" E2E_EXTRA="$(E2E_EXTRA)" E2E_RUNNER_START_TIMEOUT=$(E2E_RUNNER_START_TIMEOUT) tests/dind.sh "${K3D_IMAGE_TAG}-dind"
|
|
|
|
LOG_LEVEL="$(E2E_LOG_LEVEL)" E2E_SKIP="$(E2E_SKIP)" E2E_EXTRA="$(E2E_EXTRA)" E2E_RUNNER_START_TIMEOUT=$(E2E_RUNNER_START_TIMEOUT) tests/dind.sh "${K3D_IMAGE_TAG}-dind"
|
|
|
@ -199,7 +202,7 @@ endif |
|
|
|
ci-setup: |
|
|
|
ci-setup: |
|
|
|
@echo "Installing Go tools..."
|
|
|
|
@echo "Installing Go tools..."
|
|
|
|
curl -sfL $(PKG_GOLANGCI_LINT_SCRIPT) | sh -s -- -b ${GOPATH}/bin v$(PKG_GOLANGCI_LINT_VERSION)
|
|
|
|
curl -sfL $(PKG_GOLANGCI_LINT_SCRIPT) | sh -s -- -b ${GOPATH}/bin v$(PKG_GOLANGCI_LINT_VERSION)
|
|
|
|
go get $(PKG_GOX)
|
|
|
|
$(GO) get $(PKG_GOX)
|
|
|
|
|
|
|
|
|
|
|
|
@echo "Installing kubectl..."
|
|
|
|
@echo "Installing kubectl..."
|
|
|
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
|
|
|
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
|
|
|
|