From 712cfc06d7e541c6e28b4b127a4760b4cfccffa8 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 30 Aug 2025 23:44:48 +0900 Subject: container: wrap container init start errors This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container. Signed-off-by: Ophestra --- container/params_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'container/params_test.go') diff --git a/container/params_test.go b/container/params_test.go index 720f0bf4..a65f686a 100644 --- a/container/params_test.go +++ b/container/params_test.go @@ -29,8 +29,8 @@ func TestSetupReceive(t *testing.T) { }) } - if _, err := container.Receive(key, nil, nil); !errors.Is(err, container.ErrNotSet) { - t.Errorf("Receive: error = %v, want %v", err, container.ErrNotSet) + if _, err := container.Receive(key, nil, nil); !errors.Is(err, container.ErrReceiveEnv) { + t.Errorf("Receive: error = %v, want %v", err, container.ErrReceiveEnv) } }) @@ -38,8 +38,8 @@ func TestSetupReceive(t *testing.T) { const key = "TEST_ENV_FORMAT" t.Setenv(key, "") - if _, err := container.Receive(key, nil, nil); !errors.Is(err, container.ErrFdFormat) { - t.Errorf("Receive: error = %v, want %v", err, container.ErrFdFormat) + if _, err := container.Receive(key, nil, nil); !errors.Is(err, strconv.ErrSyntax) { + t.Errorf("Receive: error = %v, want %v", err, strconv.ErrSyntax) } }) @@ -47,8 +47,8 @@ func TestSetupReceive(t *testing.T) { const key = "TEST_ENV_RANGE" t.Setenv(key, "-1") - if _, err := container.Receive(key, nil, nil); !errors.Is(err, syscall.EBADF) { - t.Errorf("Receive: error = %v, want %v", err, syscall.EBADF) + if _, err := container.Receive(key, nil, nil); !errors.Is(err, syscall.EDOM) { + t.Errorf("Receive: error = %v, want %v", err, syscall.EDOM) } }) -- cgit v1.3.1