From cb7a4824db80c09c08fb29e9f52375d4d59fc0e3 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 29 Aug 2025 02:35:24 +0900 Subject: [PATCH] container/dispatcher: check test errors via reflect Using the errors package might conceal some incorrect behaviour. Signed-off-by: Ophestra --- container/dispatcher_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index 54a9987..64a15f7 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -146,7 +146,7 @@ func checkOpBehaviour(t *testing.T, testCases []opBehaviourTestCase) { k := &kstub{t: t, want: [][]kexpect{slices.Concat(tc.early, []kexpect{{name: "\x00"}}, tc.apply)}, wg: new(sync.WaitGroup)} errEarly := tc.op.early(state, k) k.expect("\x00") - if !errors.Is(errEarly, tc.wantErrEarly) { + if !reflect.DeepEqual(errEarly, tc.wantErrEarly) { t.Errorf("early: error = %v, want %v", errEarly, tc.wantErrEarly) } if errEarly != nil {