From 5f72dcf4206f9d8559d2ced49f28f1e0c8a46921 Mon Sep 17 00:00:00 2001 From: dd di cesare Date: Fri, 10 May 2024 11:10:41 +0200 Subject: [PATCH] [test] Has the correct TargetRef --- controllers/rate_limiting_wasmplugin_controller_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/rate_limiting_wasmplugin_controller_test.go b/controllers/rate_limiting_wasmplugin_controller_test.go index 5323209cf..77a6fa283 100644 --- a/controllers/rate_limiting_wasmplugin_controller_test.go +++ b/controllers/rate_limiting_wasmplugin_controller_test.go @@ -129,6 +129,10 @@ var _ = Describe("Rate Limiting WasmPlugin controller", Ordered, func() { err = k8sClient.Get(ctx, wasmPluginKey, existingWasmPlugin) // must exist Expect(err).ToNot(HaveOccurred()) + // has the correct target ref + Expect(existingWasmPlugin.Spec.TargetRef.Group).To(Equal("gateway.networking.k8s.io")) + Expect(existingWasmPlugin.Spec.TargetRef.Kind).To(Equal("Gateway")) + Expect(existingWasmPlugin.Spec.TargetRef.Name).To(Equal(gateway.Name)) existingWASMConfig, err := rlptools.WASMPluginFromStruct(existingWasmPlugin.Spec.PluginConfig) Expect(err).ToNot(HaveOccurred()) Expect(existingWASMConfig).To(Equal(&wasm.Plugin{