Merge pull request #994 from lonelyCZ/add-test-ci
enable unit test for cmd
This commit is contained in:
commit
4705587037
1
Makefile
1
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
|
||||
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue