diff --git a/cmd/snap-bootstrap/initramfs_systemd_mount_test.go b/cmd/snap-bootstrap/initramfs_systemd_mount_test.go index 2b381bd7cfb..ea7146dd590 100644 --- a/cmd/snap-bootstrap/initramfs_systemd_mount_test.go +++ b/cmd/snap-bootstrap/initramfs_systemd_mount_test.go @@ -670,3 +670,20 @@ Wants=%[1]s } } } + +type dummyOpts struct{} + +func (d dummyOpts) AppendOptions(strings []string) ([]string, error) { + return []string{"dummy options"}, nil +} + +func (s *doSystemdMountSuite) TestDoSystemdMountWrongFsOpts(c *C) { + + opts := &main.SystemdMountOptions{ + FsOpts: dummyOpts{}, + } + + err := main.DoSystemdMount("what", "where", opts) + c.Check(err, ErrorMatches, "cannot mount \"what\" at \"where\": invalid options") + +}