Move WithMounts to specs

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2023-01-05 20:57:52 -08:00
parent 0ae0399b16
commit dd22a3a806
8 changed files with 59 additions and 49 deletions

View File

@@ -21,18 +21,8 @@ package os
import (
"os"
"path/filepath"
"github.com/containerd/containerd/mount"
)
// UNIX collects unix system level operations that need to be
// mocked out during tests.
type UNIX interface {
Mount(source string, target string, fstype string, flags uintptr, data string) error
Unmount(target string) error
LookupMount(path string) (mount.Info, error)
}
// ResolveSymbolicLink will follow any symbolic links
func (RealOS) ResolveSymbolicLink(path string) (string, error) {
info, err := os.Lstat(path)