Skip to content

Commit 601b98e

Browse files
Add WithNamespaceName as an Option
1 parent aeab5c7 commit 601b98e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

support/test.go

+7
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ func WithConfig(t *testing.T, cfg *rest.Config) Test {
8080
}
8181
}
8282

83+
func WithNamespaceName(name string) Option[*corev1.Namespace] {
84+
return ErrorOption[*corev1.Namespace](func(ns *corev1.Namespace) error {
85+
ns.Name = name
86+
return nil
87+
})
88+
}
89+
8390
type T struct {
8491
*gomega.WithT
8592
t *testing.T

0 commit comments

Comments
 (0)