add unit tests for cmd/... in ci

Signed-off-by: lonelyCZ <531187475@qq.com>
This commit is contained in:
lonelyCZ 2021-11-19 20:32:17 +08:00
parent 5b068c31da
commit 8efa566b7c
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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{