docker_api_containers_unix_test.go 327 B

12345678910111213141516171819
  1. //go:build !windows
  2. package main
  3. import (
  4. "testing"
  5. "github.com/moby/sys/mount"
  6. )
  7. func mountWrapper(t *testing.T, device, target, mType, options string) error {
  8. t.Helper()
  9. err := mount.Mount(device, target, mType, options)
  10. if err != nil {
  11. return err
  12. }
  13. t.Cleanup(func() { _ = mount.Unmount(target) })
  14. return nil
  15. }