MCPcopy
hub / github.com/containerd/containerd / testContext

Function testContext

integration/client/client.go:47–55  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

45}
46
47func testContext(t testing.TB) (context.Context, context.CancelFunc) {
48 // This needs work to convert from context.Background() to t.Context().
49 ctx, cancel := context.WithCancel(context.Background()) //nolint:all
50 ctx = namespaces.WithNamespace(ctx, testNamespace)
51 if t != nil {
52 ctx = logtest.WithT(ctx, t)
53 }
54 return ctx, cancel
55}
56
57func createShimDebugConfig() string {
58 f, err := os.CreateTemp("", "containerd-config-")

Callers 15

testExportImportFunction · 0.85
TestImportFunction · 0.85
TestTransferImportFunction · 0.85
doFuzzFunction · 0.85
TestImageIsUnpackedFunction · 0.85
TestImageUsageFunction · 0.85
TestTransferEchoFunction · 0.85
TestContainerListFunction · 0.85
TestNewContainerFunction · 0.85
TestContainerStartFunction · 0.85

Calls 1

WithNamespaceFunction · 0.92

Tested by 15

testExportImportFunction · 0.68
TestImportFunction · 0.68
TestTransferImportFunction · 0.68
doFuzzFunction · 0.68
TestImageIsUnpackedFunction · 0.68
TestImageUsageFunction · 0.68
TestTransferEchoFunction · 0.68
TestContainerListFunction · 0.68
TestNewContainerFunction · 0.68
TestContainerStartFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…