prepare integration test

This commit is contained in:
liuwei
2020-04-30 19:16:22 +08:00
parent 6d1cb006ba
commit 64f13d6664

View File

@@ -6,7 +6,7 @@ K8S_VERSION ?=1.16.4
KB_TOOLS_ARCHIVE_NAME :=kubebuilder-tools-$(K8S_VERSION)-$(GOHOSTOS)-$(GOHOSTARCH).tar.gz
KB_TOOLS_ARCHIVE_PATH := $(TEST_TMP)/$(KB_TOOLS_ARCHIVE_NAME)
ensure-test-env:
ensure-kubebuilder-tools:
ifeq "" "$(wildcard $(KUBEBUILDER_ASSETS))"
$(info Downloading kubebuilder-tools into '$(KUBEBUILDER_ASSETS)')
mkdir -p '$(KUBEBUILDER_ASSETS)'
@@ -15,17 +15,17 @@ ifeq "" "$(wildcard $(KUBEBUILDER_ASSETS))"
else
$(info Using existing kubebuilder-tools from "$(KUBEBUILDER_ASSETS)")
endif
.PHONY: ensure-test-env
.PHONY: ensure-kubebuilder-tools
clean-test-env:
clean-integration-test:
$(RM) '$(KB_TOOLS_ARCHIVE_PATH)'
rm -rf $(TEST_TMP)/kubebuilder
$(RM) ./integration.test
.PHONY: clean-test-env
.PHONY: clean-integration-test
clean: clean-test-env
clean: clean-integration-test
test-integration: ensure-test-env
test-integration: ensure-kubebuilder-tools
go test -c ./test/integration
./integration.test -ginkgo.slowSpecThreshold=15 -ginkgo.v -ginkgo.failFast
.PHONY: test-integration
.PHONY: test-integration