SkipIfDaemonNotLinux skips the test unless the running docker daemon is on Linux
(t *testing.T)
| 82 | |
| 83 | // SkipIfDaemonNotLinux skips the test unless the running docker daemon is on Linux |
| 84 | func SkipIfDaemonNotLinux(t *testing.T) { |
| 85 | t.Helper() |
| 86 | result := icmd.RunCmd(icmd.Command("docker", "info", "--format", "{{.OSType}}")) |
| 87 | result.Assert(t, icmd.Expected{Err: icmd.None}) |
| 88 | isLinux := strings.TrimSpace(result.Stdout()) == "linux" |
| 89 | skip.If(t, !isLinux, "running against a Linux daemon") |
| 90 | } |
| 91 | |
| 92 | // SkipIfCgroupNamespacesNotSupported skips the test if the running docker daemon doesn't support cgroup namespaces |
| 93 | func SkipIfCgroupNamespacesNotSupported(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…