|
@@ -10,6 +10,7 @@ import (
|
|
"testing"
|
|
"testing"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
+ "github.com/containerd/containerd/plugin"
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types/swarm"
|
|
"github.com/docker/docker/api/types/swarm"
|
|
"github.com/docker/docker/api/types/versions"
|
|
"github.com/docker/docker/api/types/versions"
|
|
@@ -99,6 +100,17 @@ func Devicemapper() bool {
|
|
return strings.HasPrefix(testEnv.DaemonInfo.Driver, "devicemapper")
|
|
return strings.HasPrefix(testEnv.DaemonInfo.Driver, "devicemapper")
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// containerdSnapshotterEnabled checks if the daemon in the test-environment is
|
|
|
|
+// configured with containerd-snapshotters enabled.
|
|
|
|
+func containerdSnapshotterEnabled() bool {
|
|
|
|
+ for _, v := range testEnv.DaemonInfo.DriverStatus {
|
|
|
|
+ if v[0] == "driver-type" {
|
|
|
|
+ return v[1] == string(plugin.SnapshotPlugin)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+
|
|
func IPv6() bool {
|
|
func IPv6() bool {
|
|
cmd := exec.Command("test", "-f", "/proc/net/if_inet6")
|
|
cmd := exec.Command("test", "-f", "/proc/net/if_inet6")
|
|
return cmd.Run() != nil
|
|
return cmd.Run() != nil
|