MCPcopy Index your code
hub / github.com/containerd/containerd / TestTTRPCNamespaceHeader

Function TestTTRPCNamespaceHeader

pkg/namespaces/ttrpc_test.go:43–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestTTRPCNamespaceHeader(t *testing.T) {
44 ctx := context.Background()
45 namespace := "test-namespace"
46 ctx = withTTRPCNamespaceHeader(ctx, namespace)
47
48 header, ok := fromTTRPCHeader(ctx)
49 if !ok || header != namespace {
50 t.Fatalf("ttrp namespace header is set incorrectly")
51 }
52}

Callers

nothing calls this directly

Calls 2

withTTRPCNamespaceHeaderFunction · 0.85
fromTTRPCHeaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…