aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/errors_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-29 22:15:05 +0900
committerOphestra <cat@gensokyo.uk>2025-08-29 22:15:05 +0900
commit08eeafe8174efed2414d66788a927168efeba691 (patch)
tree966ab2b3abec177ee3eaeac777b4b636a32261df /container/errors_test.go
parentd7c7c69a13868546c26c3e5096fca09304a6e182 (diff)
container/mount: unwrap vfs decoder errors
These are now handled by init. This eliminates generic WrapErr from mount and procPaths. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/errors_test.go')
-rw-r--r--container/errors_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/container/errors_test.go b/container/errors_test.go
index f99812b8..df69c4b1 100644
--- a/container/errors_test.go
+++ b/container/errors_test.go
@@ -4,8 +4,11 @@ import (
"errors"
"os"
"reflect"
+ "strconv"
"syscall"
"testing"
+
+ "hakurei.app/container/vfs"
)
func TestMessageFromError(t *testing.T) {
@@ -39,6 +42,9 @@ func TestMessageFromError(t *testing.T) {
{"state", OpStateError("overlay"),
"impossible overlay state reached", true},
+ {"vfs parse", &vfs.DecoderError{Op: "parse", Line: 0xdeadbeef, Err: &strconv.NumError{Func: "Atoi", Num: "meow", Err: strconv.ErrSyntax}},
+ `cannot parse mountinfo at line 3735928559: numeric field "meow" invalid syntax`, true},
+
{"tmpfs", TmpfsSizeError(-1),
"tmpfs size -1 out of bounds", true},