MCPcopy Create free account
hub / github.com/containerd/nerdctl / AmbientRequirements

Method AmbientRequirements

pkg/testutil/nerdtest/test.go:45–66  ·  view source on GitHub ↗
(testCase *test.Case, t tig.T)

Source from the content-addressed store, hash-verified

43}
44
45func (ns *nerdctlSetup) AmbientRequirements(testCase *test.Case, t tig.T) {
46 // Ambient requirements, bail out now if these do not match
47 if environmentHasIPv6() && testCase.Config.Read(ipv6) != only {
48 t.Skip("runner skips non-IPv6 compatible tests in the IPv6 environment")
49 }
50
51 if environmentHasKubernetes() && testCase.Config.Read(kubernetes) != only {
52 t.Skip("runner skips non-Kubernetes compatible tests in the Kubernetes environment")
53 }
54
55 if environmentIsForFlaky() && testCase.Config.Read(flaky) != only {
56 t.Skip("runner skips non-flaky tests in the flaky environment")
57 }
58
59 if !isTargetNerdish() && testCase.Config.Read(modePrivate) == enabled {
60 // For docker, we do disable parallel since there is no namespace where we can isolate
61 testCase.NoParallel = true
62 }
63
64 // We do not want private to get inherited by subtests, as we want them to be in the same namespace set here
65 testCase.Config.Write(modePrivate, "")
66}

Callers

nothing calls this directly

Calls 7

environmentHasIPv6Function · 0.85
environmentHasKubernetesFunction · 0.85
environmentIsForFlakyFunction · 0.85
isTargetNerdishFunction · 0.85
ReadMethod · 0.65
SkipMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected