Merge pull request #994 from lonelyCZ/add-test-ci

enable unit test for cmd
This commit is contained in:
karmada-bot 2021-11-20 10:20:08 +08:00 committed by GitHub
commit 4705587037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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{