From 510850b7b752b6e0240aa3703c0b063a2e6a23c6 Mon Sep 17 00:00:00 2001 From: Constantin Daniel Vultur Date: Mon, 10 Jun 2024 15:56:16 +0200 Subject: [PATCH] hw-accel: fix KMM test --- tests/hw-accel/kmm/mcm/tests/webhook-test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/hw-accel/kmm/mcm/tests/webhook-test.go b/tests/hw-accel/kmm/mcm/tests/webhook-test.go index 7d833ddeb..578316f2d 100644 --- a/tests/hw-accel/kmm/mcm/tests/webhook-test.go +++ b/tests/hw-accel/kmm/mcm/tests/webhook-test.go @@ -159,11 +159,12 @@ var _ = Describe("KMM-HUB", Ordered, Label(tsparams.LabelSuite), func() { Expect(err).ToNot(HaveOccurred(), "error building module spec") By("Create ManagedClusterModule") - _, err = kmm.NewManagedClusterModuleBuilder(APIClient, "no-spoke-namespace", + mcm, err := kmm.NewManagedClusterModuleBuilder(APIClient, "no-spoke-namespace", kmmparams.KmmHubOperatorNamespace). WithModuleSpec(moduleSpec). WithSelector(kmmparams.KmmHubSelector).Create() - Expect(err.Error()).To(ContainSubstring("is invalid: spec.spokeNamespace: Required value")) + Expect(mcm.Definition.Spec.SpokeNamespace).To(Equal("")) + Expect(err.Error()).To(ContainSubstring("admission webhook \"vmanagedclustermodule.kb.io\" denied the request")) }) }) })