From 601b98e501b7a1721db272085532b50f3d4a30df Mon Sep 17 00:00:00 2001 From: ChristianZaccaria Date: Thu, 6 Mar 2025 15:19:33 +0000 Subject: [PATCH] Add WithNamespaceName as an Option --- support/test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/support/test.go b/support/test.go index 1c60d38..214dd9e 100644 --- a/support/test.go +++ b/support/test.go @@ -80,6 +80,13 @@ func WithConfig(t *testing.T, cfg *rest.Config) Test { } } +func WithNamespaceName(name string) Option[*corev1.Namespace] { + return ErrorOption[*corev1.Namespace](func(ns *corev1.Namespace) error { + ns.Name = name + return nil + }) +} + type T struct { *gomega.WithT t *testing.T