From 1904d89ab2b2520381501059d3c613d6bd15fca4 Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Fri, 24 Nov 2023 11:33:56 +0100 Subject: [PATCH] Add function to create a NATS CR with warning state (#233) * Delete external CRD folder * Add Setting NATS state to Warning for tests --- testutils/options.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testutils/options.go b/testutils/options.go index 5bb422c7..ef381d29 100644 --- a/testutils/options.go +++ b/testutils/options.go @@ -146,6 +146,13 @@ func WithNATSStateReady() NATSOption { } } +func WithNATSStateWarning() NATSOption { + return func(nats *v1alpha1.NATS) error { + nats.Status.State = v1alpha1.StateWarning + return nil + } +} + func WithNATSStateProcessing() NATSOption { return func(nats *v1alpha1.NATS) error { nats.Status.State = v1alpha1.StateProcessing