diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 99e6feaa62..3e8cbf904b 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -277,12 +277,12 @@ func (c *Container) GetMounts(namedVolumes []*ContainerNamedVolume, imageVolumes for _, mount := range mounts { // It's a mount. // Is it a tmpfs? If so, discard. - if mount.Type == "tmpfs" { + if mount.Type == define.TypeTmpfs { continue } mountStruct := define.InspectMount{} - mountStruct.Type = "bind" + mountStruct.Type = define.TypeBind mountStruct.Source = mount.Source mountStruct.Destination = mount.Destination @@ -534,7 +534,7 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named } } for _, mount := range mounts { - if mount.Type == "tmpfs" { + if mount.Type == define.TypeTmpfs { tmpfs[mount.Destination] = strings.Join(mount.Options, ",") } else { // TODO - maybe we should parse for empty source/destination diff --git a/libpod/container_internal_common.go b/libpod/container_internal_common.go index 13fe44e734..6072469527 100644 --- a/libpod/container_internal_common.go +++ b/libpod/container_internal_common.go @@ -351,7 +351,7 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc } switch o { case "U": - if m.Type == "tmpfs" { + if m.Type == define.TypeTmpfs { options = append(options, []string{fmt.Sprintf("uid=%d", execUser.Uid), fmt.Sprintf("gid=%d", execUser.Gid)}...) } else { // only chown on initial creation of container @@ -581,7 +581,7 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc // Runc and other runtimes may choke on them. // Easy solution: use securejoin to do a scoped evaluation of // the links, then trim off the mount prefix. - if m.Type == "tmpfs" { + if m.Type == define.TypeTmpfs { finalPath, err := securejoin.SecureJoin(c.state.Mountpoint, m.Destination) if err != nil { return nil, nil, fmt.Errorf("resolving symlinks for mount destination %s: %w", m.Destination, err) @@ -1598,10 +1598,10 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti if options.TargetFile != "" || options.CheckpointImageID != "" { for dstPath, srcPath := range c.state.BindMounts { newMount := spec.Mount{ - Type: "bind", + Type: define.TypeBind, Source: srcPath, Destination: dstPath, - Options: []string{"bind", "private"}, + Options: []string{define.TypeBind, "private"}, } if c.IsReadOnly() && dstPath != "/dev/shm" { newMount.Options = append(newMount.Options, "ro", "nosuid", "noexec", "nodev") @@ -1962,7 +1962,7 @@ func (c *Container) makeBindMounts() error { case m.Destination == "/run/.containerenv": hasRunContainerenv = true break Loop - case m.Destination == "/run" && m.Source != "tmpfs": + case m.Destination == "/run" && m.Source != define.TypeTmpfs: hasRunContainerenv = true break Loop } diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 2f1082907f..6e5d0c37f8 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -30,7 +30,7 @@ import ( ) var ( - bindOptions = []string{"bind", "rprivate"} + bindOptions = []string{define.TypeBind, "rprivate"} ) func (c *Container) mountSHM(shmOptions string) error { @@ -39,7 +39,7 @@ func (c *Container) mountSHM(shmOptions string) error { contextType = "rootcontext" } - if err := unix.Mount("shm", c.config.ShmDir, "tmpfs", unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV, + if err := unix.Mount("shm", c.config.ShmDir, define.TypeTmpfs, unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV, label.FormatMountLabelByType(shmOptions, c.config.MountLabel, contextType)); err != nil { return fmt.Errorf("failed to mount shm tmpfs %q: %w", c.config.ShmDir, err) } @@ -225,8 +225,8 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro } tmpfsMnt := spec.Mount{ Destination: dest, - Type: "tmpfs", - Source: "tmpfs", + Type: define.TypeTmpfs, + Source: define.TypeTmpfs, Options: append(options, "tmpcopyup", shmSizeSystemdMntOpt), } g.AddMount(tmpfsMnt) @@ -237,8 +237,8 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro } tmpfsMnt := spec.Mount{ Destination: dest, - Type: "tmpfs", - Source: "tmpfs", + Type: define.TypeTmpfs, + Source: define.TypeTmpfs, Options: append(options, "tmpcopyup", shmSizeSystemdMntOpt), } g.AddMount(tmpfsMnt) @@ -271,9 +271,9 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro } else { systemdMnt = spec.Mount{ Destination: "/sys/fs/cgroup", - Type: "bind", + Type: define.TypeBind, Source: "/sys/fs/cgroup", - Options: []string{"bind", "private", "rw"}, + Options: []string{define.TypeBind, "private", "rw"}, } } g.AddMount(systemdMnt) @@ -282,7 +282,7 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro if hasCgroupNs && !hasSystemdMount { return errors.New("cgroup namespace is not supported with cgroup v1 and systemd mode") } - mountOptions := []string{"bind", "rprivate"} + mountOptions := []string{define.TypeBind, "rprivate"} if !hasSystemdMount { skipMount := hasSystemdMount @@ -311,7 +311,7 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro if !skipMount { systemdMnt := spec.Mount{ Destination: "/sys/fs/cgroup/systemd", - Type: "bind", + Type: define.TypeBind, Source: "/sys/fs/cgroup/systemd", Options: mountOptions, } diff --git a/libpod/container_path_resolution.go b/libpod/container_path_resolution.go index bd8c3f478a..af9c3277e6 100644 --- a/libpod/container_path_resolution.go +++ b/libpod/container_path_resolution.go @@ -5,6 +5,7 @@ import ( "path/filepath" "strings" + "github.com/containers/podman/v4/libpod/define" securejoin "github.com/cyphar/filepath-securejoin" "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" @@ -155,7 +156,7 @@ func isPathOnVolume(c *Container, containerPath string) bool { func findBindMount(c *Container, containerPath string) *specs.Mount { cleanedPath := filepath.Clean(containerPath) for _, m := range c.config.Spec.Mounts { - if m.Type != "bind" { + if m.Type != define.TypeBind { continue } if cleanedPath == filepath.Clean(m.Destination) { diff --git a/libpod/define/mount_linux.go b/libpod/define/mount_linux.go index 126e0d6c77..7c8e5fe7dd 100644 --- a/libpod/define/mount_linux.go +++ b/libpod/define/mount_linux.go @@ -9,5 +9,5 @@ const ( var ( // Mount potions for bind - BindOptions = []string{"bind"} + BindOptions = []string{TypeBind} ) diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index b8485a2844..feb125faf4 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -22,6 +22,7 @@ import ( netUtil "github.com/containers/common/libnetwork/util" "github.com/containers/common/pkg/netns" "github.com/containers/common/pkg/util" + "github.com/containers/podman/v4/libpod/define" "github.com/containers/podman/v4/pkg/rootless" "github.com/containers/podman/v4/utils" "github.com/containers/storage/pkg/lockfile" @@ -180,7 +181,7 @@ func (r *RootlessNetNS) Do(toRun func() error) error { // see: https://github.com/containers/podman/issues/10929 if strings.HasPrefix(resolvePath, "/run/systemd/resolve/") { rsr := r.getPath("/run/systemd/resolve") - err = unix.Mount("", rsr, "tmpfs", unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV, "") + err = unix.Mount("", rsr, define.TypeTmpfs, unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV, "") if err != nil { return fmt.Errorf("failed to mount tmpfs on %q for rootless netns: %w", rsr, err) } diff --git a/libpod/runtime_volume_common.go b/libpod/runtime_volume_common.go index b771f464d6..97be039678 100644 --- a/libpod/runtime_volume_common.go +++ b/libpod/runtime_volume_common.go @@ -78,7 +78,7 @@ func (r *Runtime) newVolume(ctx context.Context, noCreatePluginVolume bool, opti for key, val := range volume.config.Options { switch strings.ToLower(key) { case "device": - if strings.ToLower(volume.config.Options["type"]) == "bind" { + if strings.ToLower(volume.config.Options["type"]) == define.TypeBind { if _, err := os.Stat(val); err != nil { return nil, fmt.Errorf("invalid volume option %s for driver 'local': %w", key, err) } diff --git a/libpod/volume_internal_common.go b/libpod/volume_internal_common.go index 4ff7ac7902..199059cc4c 100644 --- a/libpod/volume_internal_common.go +++ b/libpod/volume_internal_common.go @@ -101,7 +101,7 @@ func (v *Volume) mount() error { } switch volType { case "": - case "bind": + case define.TypeBind: mountArgs = append(mountArgs, "-o", volType) default: mountArgs = append(mountArgs, "-t", volType) diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index 3856d09bef..141ed46f81 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -414,7 +414,7 @@ func cliOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.C Expose: expose, GroupAdd: cc.HostConfig.GroupAdd, Hostname: cc.Config.Hostname, - ImageVolume: "bind", + ImageVolume: define.TypeBind, Init: init, Interactive: cc.Config.OpenStdin, IPC: string(cc.HostConfig.IpcMode), diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 9a39ff32a5..5c882a5ed3 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -312,7 +312,7 @@ type ContainerCreateOptions struct { func NewInfraContainerCreateOptions() ContainerCreateOptions { options := ContainerCreateOptions{ IsInfra: true, - ImageVolume: "bind", + ImageVolume: define.TypeBind, MemorySwappiness: -1, } return options diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index 2883c6b41f..03dda23a7d 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -66,7 +66,7 @@ func (ic *ContainerEngine) createServiceContainer(ctx context.Context, name stri ctrOpts := entities.ContainerCreateOptions{ // Inherited from infra containers - ImageVolume: "bind", + ImageVolume: define.TypeBind, IsInfra: false, MemorySwappiness: -1, ReadOnly: true, @@ -1150,7 +1150,7 @@ func (ic *ContainerEngine) importVolume(ctx context.Context, vol *libpod.Volume, // Check if volume is using `local` driver and has mount options type other than tmpfs if len(driver) == 0 || driver == define.VolumeDriverLocal { if mountOptionType, ok := volumeOptions["type"]; ok { - if mountOptionType != "tmpfs" && !volumeMountStatus.Value { + if mountOptionType != define.TypeTmpfs && !volumeMountStatus.Value { return fmt.Errorf("volume is using a driver %s and volume is not mounted on %s", driver, mountPoint) } } diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index d4311a91c9..536c2ff9a4 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -17,7 +17,7 @@ var ( // SdNotifyModeValues describes the only values that SdNotifyMode can be SdNotifyModeValues = []string{define.SdNotifyModeContainer, define.SdNotifyModeConmon, define.SdNotifyModeIgnore} // ImageVolumeModeValues describes the only values that ImageVolumeMode can be - ImageVolumeModeValues = []string{"ignore", "tmpfs", "anonymous"} + ImageVolumeModeValues = []string{"ignore", define.TypeTmpfs, "anonymous"} ) func exclusiveOptions(opt1, opt2 string) error { diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index bec3bc9569..94bae4b5f4 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -182,7 +182,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener if len(s.ImageVolumeMode) == 0 { s.ImageVolumeMode = rtc.Engine.ImageVolumeMode } - if s.ImageVolumeMode == "bind" { + if s.ImageVolumeMode == define.TypeBind { s.ImageVolumeMode = "anonymous" } @@ -422,7 +422,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener mount := spec.Mount{ Destination: volume.MountPath, Source: volumeSource.Source, - Type: "bind", + Type: define.TypeBind, Options: options, } if len(volume.SubPath) > 0 { diff --git a/pkg/specgen/generate/oci_freebsd.go b/pkg/specgen/generate/oci_freebsd.go index 9054785c1a..dd00622dd3 100644 --- a/pkg/specgen/generate/oci_freebsd.go +++ b/pkg/specgen/generate/oci_freebsd.go @@ -102,7 +102,7 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt }, spec.Mount{ Destination: "/dev/shm", - Type: "tmpfs", + Type: define.TypeTmpfs, Source: "shm", Options: []string{"notmpcopyup"}, }, diff --git a/pkg/specgen/generate/oci_linux.go b/pkg/specgen/generate/oci_linux.go index 7b1090a9bc..91d5a44f42 100644 --- a/pkg/specgen/generate/oci_linux.go +++ b/pkg/specgen/generate/oci_linux.go @@ -107,7 +107,7 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt } sysMnt := spec.Mount{ Destination: "/sys", - Type: "bind", + Type: define.TypeBind, Source: "/sys", Options: []string{"rprivate", "nosuid", "noexec", "nodev", r, "rbind"}, } @@ -115,7 +115,7 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt g.RemoveMount("/sys/fs/cgroup") sysFsCgroupMnt := spec.Mount{ Destination: "/sys/fs/cgroup", - Type: "bind", + Type: define.TypeBind, Source: "/sys/fs/cgroup", Options: []string{"rprivate", "nosuid", "noexec", "nodev", r, "rbind"}, } @@ -151,8 +151,8 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt g.RemoveMount("/dev/pts") devPts := spec.Mount{ Destination: "/dev/pts", - Type: "devpts", - Source: "devpts", + Type: define.TypeDevpts, + Source: define.TypeDevpts, Options: []string{"rprivate", "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620"}, } g.AddMount(devPts) @@ -164,9 +164,9 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt g.RemoveMount("/dev/mqueue") devMqueue := spec.Mount{ Destination: "/dev/mqueue", - Type: "bind", // constant ? + Type: define.TypeBind, // constant ? Source: "/dev/mqueue", - Options: []string{"bind", "nosuid", "noexec", "nodev"}, + Options: []string{define.TypeBind, "nosuid", "noexec", "nodev"}, } g.AddMount(devMqueue) } diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go index 52d7427520..445bc07c6f 100644 --- a/pkg/specgen/generate/storage.go +++ b/pkg/specgen/generate/storage.go @@ -224,7 +224,7 @@ func getImageVolumes(ctx context.Context, img *libimage.Image, s *specgen.SpecGe newVol.Options = []string{"rprivate", "rw", "nodev", "exec"} volumes[cleanDest] = newVol logrus.Debugf("Adding anonymous image volume at %q", cleanDest) - case "tmpfs": + case define.TypeTmpfs: mount := spec.Mount{ Destination: cleanDest, Source: define.TypeTmpfs, diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 16c1b30810..71d26f4bb2 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -552,7 +552,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions if len(s.ImageVolumeMode) == 0 { s.ImageVolumeMode = rtc.Engine.ImageVolumeMode } - if s.ImageVolumeMode == "bind" { + if s.ImageVolumeMode == define.TypeBind { s.ImageVolumeMode = "anonymous" } diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go index c77710ffea..0305cbfe69 100644 --- a/pkg/specgenutil/volumes.go +++ b/pkg/specgenutil/volumes.go @@ -247,7 +247,7 @@ func parseMountOptions(mountType string, args []string) (*spec.Mount, error) { if mountType != define.TypeBind { return nil, fmt.Errorf("%q option not supported for %q mount types", kv[0], mountType) } - mnt.Options = append(mnt.Options, "bind") + mnt.Options = append(mnt.Options, define.TypeBind) case "bind-propagation": if mountType != define.TypeBind { return nil, fmt.Errorf("%q option not supported for %q mount types", kv[0], mountType) diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go index 9dabdabb18..f9aeaba26d 100644 --- a/pkg/util/mountOpts.go +++ b/pkg/util/mountOpts.go @@ -4,6 +4,8 @@ import ( "errors" "fmt" "strings" + + "github.com/containers/podman/v4/libpod/define" ) var ( @@ -131,7 +133,7 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string foundCopyUp = true // do not propagate notmpcopyup to the OCI runtime continue - case "bind", "rbind": + case define.TypeBind, "rbind": if isTmpfs { return nil, fmt.Errorf("the 'bind' and 'rbind' options are not allowed with tmpfs mounts: %w", ErrBadMntOption) } diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go index 09ebec6592..ad54bac041 100644 --- a/test/e2e/generate_kube_test.go +++ b/test/e2e/generate_kube_test.go @@ -1280,8 +1280,8 @@ USER test1` It("podman generate kube on named volume with options", func() { vol := "complex-named-volume" - volDevice := "tmpfs" - volType := "tmpfs" + volDevice := define.TypeTmpfs + volType := define.TypeTmpfs volOpts := "nodev,noexec" session := podmanTest.Podman([]string{"volume", "create", "--opt", "device=" + volDevice, "--opt", "type=" + volType, "--opt", "o=" + volOpts, vol}) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index bbfe91ec11..1a00759166 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -3289,7 +3289,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/") // only one will be mounted. Host path volumes take precedence. ctrJSON := inspect.InspectContainerToJSON() Expect(ctrJSON[0].Mounts).To(HaveLen(1)) - Expect(ctrJSON[0].Mounts[0]).To(HaveField("Type", "bind")) + Expect(ctrJSON[0].Mounts[0]).To(HaveField("Type", define.TypeBind)) }) @@ -3617,8 +3617,8 @@ MemoryReservation: {{ .HostConfig.MemoryReservation }}`}) It("podman play kube persistentVolumeClaim", func() { volName := "myvol" - volDevice := "tmpfs" - volType := "tmpfs" + volDevice := define.TypeTmpfs + volType := define.TypeTmpfs volOpts := "nodev,noexec" pvc := getPVC(withPVCName(volName), @@ -3986,8 +3986,8 @@ invalid kube kind It("podman play kube teardown with volume without force delete", func() { volName := RandomString(12) - volDevice := "tmpfs" - volType := "tmpfs" + volDevice := define.TypeTmpfs + volType := define.TypeTmpfs volOpts := "nodev,noexec" pvc := getPVC(withPVCName(volName), @@ -4018,8 +4018,8 @@ invalid kube kind It("podman play kube teardown with volume force delete", func() { volName := RandomString(12) - volDevice := "tmpfs" - volType := "tmpfs" + volDevice := define.TypeTmpfs + volType := define.TypeTmpfs volOpts := "nodev,noexec" pvc := getPVC(withPVCName(volName), @@ -4050,8 +4050,8 @@ invalid kube kind It("podman play kube after teardown with volume reuse", func() { volName := RandomString(12) - volDevice := "tmpfs" - volType := "tmpfs" + volDevice := define.TypeTmpfs + volType := define.TypeTmpfs volOpts := "nodev,noexec" pvc := getPVC(withPVCName(volName), diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 073b419d7a..e4eae794ad 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1260,7 +1260,7 @@ USER mail`, BB) session := podmanTest.Podman([]string{"run", "--mount", "type=devpts,target=/foo/bar", fedoraMinimal, "stat", "-f", "-c%T", "/foo/bar"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.OutputToString()).To(ContainSubstring("devpts")) + Expect(session.OutputToString()).To(ContainSubstring(define.TypeDevpts)) }) It("podman run --mount type=devpts,target=/dev/pts with uid, gid and mode", func() { diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go index d4b054c176..6bf6bba5b9 100644 --- a/test/e2e/toolbox_test.go +++ b/test/e2e/toolbox_test.go @@ -34,6 +34,7 @@ import ( "strings" "syscall" + "github.com/containers/podman/v4/libpod/define" . "github.com/containers/podman/v4/test/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -301,7 +302,7 @@ var _ = Describe("Toolbox-specific testing", func() { var session *PodmanSessionIntegration session = podmanTest.Podman([]string{"run", "--privileged", "--userns=keep-id", "--user", "root:root", ALPINE, - "mount", "-t", "tmpfs", "tmpfs", "/tmp"}) + "mount", "-t", define.TypeTmpfs, define.TypeTmpfs, "/tmp"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/e2e/volume_inspect_test.go b/test/e2e/volume_inspect_test.go index 3cf64fe12d..f6335cf49b 100644 --- a/test/e2e/volume_inspect_test.go +++ b/test/e2e/volume_inspect_test.go @@ -1,6 +1,7 @@ package integration import ( + "github.com/containers/podman/v4/libpod/define" . "github.com/containers/podman/v4/test/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -65,6 +66,6 @@ var _ = Describe("Podman volume inspect", func() { inspect := podmanTest.Podman([]string{"volume", "inspect", volName}) inspect.WaitWithDefaultTimeout() Expect(inspect).Should(Exit(0)) - Expect(inspect.OutputToString()).To(ContainSubstring("tmpfs")) + Expect(inspect.OutputToString()).To(ContainSubstring(define.TypeTmpfs)) }) })