cmd/dockerd: TestUserTerminatedError: fix unhandled errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-03-19 14:01:38 +01:00
parent 888716aa59
commit f519a8648d
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -87,7 +87,7 @@ func TestUserTerminatedError(t *testing.T) {
notifyCtx, cancelNotify := notifyContext(ctx, platformsignals.TerminationSignals...)
t.Cleanup(cancelNotify)
syscall.Kill(syscall.Getpid(), syscall.SIGINT)
assert.Check(t, syscall.Kill(syscall.Getpid(), syscall.SIGINT))
<-notifyCtx.Done()
assert.ErrorIs(t, context.Cause(notifyCtx), errCtxSignalTerminated{
@ -99,7 +99,7 @@ func TestUserTerminatedError(t *testing.T) {
notifyCtx, cancelNotify = notifyContext(ctx, platformsignals.TerminationSignals...)
t.Cleanup(cancelNotify)
syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
assert.Check(t, syscall.Kill(syscall.Getpid(), syscall.SIGTERM))
<-notifyCtx.Done()
assert.ErrorIs(t, context.Cause(notifyCtx), errCtxSignalTerminated{