diff options
Diffstat (limited to 'container/inittmpfs_test.go')
| -rw-r--r-- | container/inittmpfs_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/container/inittmpfs_test.go b/container/inittmpfs_test.go index 8110f446..97a591f2 100644 --- a/container/inittmpfs_test.go +++ b/container/inittmpfs_test.go @@ -1,17 +1,24 @@ package container import ( - "io/fs" "os" "syscall" "testing" ) func TestMountTmpfsOp(t *testing.T) { + t.Run("size error", func(t *testing.T) { + tmpfsSizeError := TmpfsSizeError(-1) + want := "tmpfs size -1 out of bounds" + if got := tmpfsSizeError.Error(); got != want { + t.Errorf("Error: %q, want %q", got, want) + } + }) + checkOpBehaviour(t, []opBehaviourTestCase{ {"size oob", new(Params), &MountTmpfsOp{ Size: -1, - }, nil, nil, nil, msg.WrapErr(fs.ErrInvalid, "size -1 out of bounds")}, + }, nil, nil, nil, TmpfsSizeError(-1)}, {"success", new(Params), &MountTmpfsOp{ FSName: "ephemeral", |
