aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-29 02:35:24 +0900
committerOphestra <cat@gensokyo.uk>2025-08-29 02:35:24 +0900
commit1c7e634f09f6644faf611477dc0e223d9b0b4ecb (patch)
tree938300416d52c1a142ba4180fd11cc3d33a51cc9 /container/dispatcher_test.go
parent8d472ebf2b654e0b97b21b40a4333184fc2c0736 (diff)
container/dispatcher: check test errors via reflect
Using the errors package might conceal some incorrect behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher_test.go')
-rw-r--r--container/dispatcher_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go
index 54a99873..74d77f46 100644
--- a/container/dispatcher_test.go
+++ b/container/dispatcher_test.go
@@ -146,14 +146,14 @@ 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 {
goto out
}
- if err := tc.op.apply(state, k); !errors.Is(err, tc.wantErrApply) {
+ if err := tc.op.apply(state, k); !reflect.DeepEqual(err, tc.wantErrApply) {
t.Errorf("apply: error = %v, want %v", err, tc.wantErrApply)
}