aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/params_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-30 23:44:48 +0900
committerOphestra <cat@gensokyo.uk>2025-08-30 23:44:48 +0900
commit712cfc06d7e541c6e28b4b127a4760b4cfccffa8 (patch)
tree3dbd2bc0fc03ba5d108646b342392f5fdf841c90 /container/params_test.go
parentf5abce9df5727904a1daa246025a87c4bfe62553 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/params_test.go')
-rw-r--r--container/params_test.go12
1 files changed, 6 insertions, 6 deletions
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)
}
})