From f519a8648d59a958764ed0b7073de4bc2c271c6c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 19 Mar 2025 14:01:38 +0100 Subject: [PATCH] cmd/dockerd: TestUserTerminatedError: fix unhandled errors Signed-off-by: Sebastiaan van Stijn --- cmd/docker/docker_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/docker/docker_test.go b/cmd/docker/docker_test.go index cd3625b670..5dc5319b3a 100644 --- a/cmd/docker/docker_test.go +++ b/cmd/docker/docker_test.go @@ -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{