diff --git a/Makefile b/Makefile index 3b6aae41a..2e574fada 100644 --- a/Makefile +++ b/Makefile @@ -381,7 +381,7 @@ catalog-push: ## Push a catalog image. .PHONY: test-unit test-unit: manifests fmt vet envtest ## Run unit tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(go list ./... | grep -v /test/) -coverprofile cover.out + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -v ./pkg/controllers/ -coverprofile cover.out .PHONY: test-component test-component: envtest ginkgo ## Run component tests. diff --git a/pkg/controllers/raycluster_webhook_test.go b/pkg/controllers/raycluster_webhook_test.go index 282fcdd45..3586bc062 100644 --- a/pkg/controllers/raycluster_webhook_test.go +++ b/pkg/controllers/raycluster_webhook_test.go @@ -310,11 +310,10 @@ func TestValidateCreate(t *testing.T) { }) // Negative Test: Invalid RayCluster with EnableIngress set to true - trueBool := true invalidRayCluster := validRayCluster.DeepCopy() t.Run("Negative: Expected errors on call to ValidateCreate function due to EnableIngress set to True", func(t *testing.T) { - invalidRayCluster.Spec.HeadGroupSpec.EnableIngress = &trueBool + invalidRayCluster.Spec.HeadGroupSpec.EnableIngress = support.Ptr(true) _, err := rcWebhook.ValidateCreate(test.Ctx(), runtime.Object(invalidRayCluster)) test.Expect(err).Should(HaveOccurred(), "Expected errors on call to ValidateCreate function due to EnableIngress set to True") })