diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-01-15 10:07:51 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-01-15 10:13:18 +0900 |
| commit | 562f5ed7971603a4e4e3315a7fe4188153bfc205 (patch) | |
| tree | 2a751ea418e305c97bcef5625b5d4b8633b74834 /internal/app/app_test.go | |
| parent | db03565614821695efdb283a81a4733e6d321670 (diff) | |
fst: hide sockets exposed via Filesystem
This is mostly useful for permissive defaults.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/app_test.go')
| -rw-r--r-- | internal/app/app_test.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/internal/app/app_test.go b/internal/app/app_test.go index a8fd761e..25691ffe 100644 --- a/internal/app/app_test.go +++ b/internal/app/app_test.go @@ -1,6 +1,7 @@ package app_test import ( + "encoding/json" "io/fs" "reflect" "testing" @@ -48,14 +49,22 @@ func TestApp(t *testing.T) { t.Run("compare bwrap", func(t *testing.T) { if !reflect.DeepEqual(gotBwrap, tc.wantBwrap) { - t.Errorf("seal: bwrap = %#v, want %#v", - gotBwrap, tc.wantBwrap) + t.Errorf("seal: bwrap =\n%s\n, want\n%s", + mustMarshal(gotBwrap), mustMarshal(tc.wantBwrap)) } }) }) } } +func mustMarshal(v any) string { + if b, err := json.Marshal(v); err != nil { + panic(err.Error()) + } else { + return string(b) + } +} + func stubDirEntries(names ...string) (e []fs.DirEntry, err error) { e = make([]fs.DirEntry, len(names)) for i, name := range names { |
