container/dispatcher: check test errors via reflect
Some checks failed
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m12s
Test / Flake checks (push) Has been cancelled
Test / Hakurei (race detector) (push) Has started running
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Some checks failed
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m12s
Test / Flake checks (push) Has been cancelled
Test / Hakurei (race detector) (push) Has started running
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Using the errors package might conceal some incorrect behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
202efb7c7c
commit
cb7a4824db
@ -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)}
|
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)
|
errEarly := tc.op.early(state, k)
|
||||||
k.expect("\x00")
|
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)
|
t.Errorf("early: error = %v, want %v", errEarly, tc.wantErrEarly)
|
||||||
}
|
}
|
||||||
if errEarly != nil {
|
if errEarly != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user