Merge pull request #5941 from thaJeztah/TestUserTerminatedError_handle_errs
cmd/dockerd: TestUserTerminatedError: fix unhandled errors
This commit is contained in:
commit
2b0631f45e
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user