From 545d893975956b33fe589e2ddbdc09e7d9c29817 Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Mon, 23 Oct 2023 20:47:14 -0400 Subject: [PATCH] Use atomic.Bool in FailOnActionReactor ...instead of atomic.Value. Signed-off-by: Tom Pantelis --- pkg/fake/fail_on_action_reactor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/fake/fail_on_action_reactor.go b/pkg/fake/fail_on_action_reactor.go index fd404839..69cc1e61 100644 --- a/pkg/fake/fail_on_action_reactor.go +++ b/pkg/fake/fail_on_action_reactor.go @@ -27,7 +27,7 @@ import ( ) type FailOnActionReactor struct { - fail atomic.Value + fail atomic.Bool } func (r *FailOnActionReactor) Fail(v bool) { @@ -47,7 +47,7 @@ func FailOnAction(f *testing.Fake, resource, verb string, customErr error, autoR defer f.Unlock() f.PrependReactor(verb, resource, func(action testing.Action) (bool, runtime.Object, error) { - if r.fail.Load().(bool) { + if r.fail.Load() { if autoReset { r.fail.Store(false) }