From 8efa566b7ccb9ffc291999dac38d08746dc39710 Mon Sep 17 00:00:00 2001 From: lonelyCZ <531187475@qq.com> Date: Fri, 19 Nov 2021 20:32:17 +0800 Subject: [PATCH] add unit tests for cmd/... in ci Signed-off-by: lonelyCZ <531187475@qq.com> --- Makefile | 1 + cmd/agent/app/options/validation_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 11415f7f7..471633d28 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ verify: .PHONY: test test: go test --race --v ./pkg/... + go test --race --v ./cmd/... images: image-karmada-controller-manager image-karmada-scheduler image-karmada-webhook image-karmada-agent image-karmada-scheduler-estimator diff --git a/cmd/agent/app/options/validation_test.go b/cmd/agent/app/options/validation_test.go index ae837cbdb..8626aaf18 100644 --- a/cmd/agent/app/options/validation_test.go +++ b/cmd/agent/app/options/validation_test.go @@ -52,7 +52,7 @@ func TestValidateKarmadaAgentConfiguration(t *testing.T) { ClusterLeaseDuration: metav1.Duration{Duration: 40 * time.Second}, ClusterLeaseRenewIntervalFraction: 0.25, }, - expectedErrs: field.ErrorList{field.Invalid(newPath.Child("ClusterName"), "", "clusterName cannot be empty")}, + expectedErrs: field.ErrorList{field.Invalid(newPath.Child("ClusterName"), "", "must be not empty")}, }, "invalid ClusterStatusUpdateFrequency": { opt: Options{