From 1bb3d78540960e20c281ce44c5929fa145bdfefc Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Thu, 1 Feb 2024 20:07:44 +0800 Subject: [PATCH] Scoping for go test in pkg and cmd Signed-off-by: LiZhenCheng9527 --- Makefile | 3 ++- hack/e2e-test/install-kurator.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4da070d12..33b272f4d 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,8 @@ gen-chart: sync-crds .PHONY: test test: clean tidy - go test ./... + go test ./pkg/... + go test ./cmd/... .PHONY: clean clean: diff --git a/hack/e2e-test/install-kurator.sh b/hack/e2e-test/install-kurator.sh index a82d67bb5..fbc8ebcbc 100755 --- a/hack/e2e-test/install-kurator.sh +++ b/hack/e2e-test/install-kurator.sh @@ -14,10 +14,6 @@ VERSION=$(echo "$COMMIT_ID" | grep -o '^[0-9]') sleep 5s -VERSION=${VERSION} make docker -kind load docker-image ghcr.io/kurator-dev/cluster-operator:${VERSION} --name kurator-host -kind load docker-image ghcr.io/kurator-dev/fleet-manager:${VERSION} --name kurator-host - helm repo add jetstack https://charts.jetstack.io helm repo update kubectl create namespace cert-manager @@ -35,6 +31,10 @@ EOF sleep 5s +VERSION=${VERSION} make docker +kind load docker-image ghcr.io/kurator-dev/cluster-operator:${VERSION} --name kurator-host +kind load docker-image ghcr.io/kurator-dev/fleet-manager:${VERSION} --name kurator-host + VERSION=${VERSION} make gen-chart cd out/charts helm install --create-namespace kurator-cluster-operator cluster-operator-${VERSION}.tgz -n kurator-system