MCPcopy
hub / github.com/containerd/containerd / TestCopyTTRPCMetadata

Function TestCopyTTRPCMetadata

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

Source from the content-addressed store, hash-verified

25)
26
27func TestCopyTTRPCMetadata(t *testing.T) {
28 src := ttrpc.MD{}
29 src.Set("key", "a", "b", "c", "d")
30 md := src.Clone()
31
32 if !reflect.DeepEqual(src, md) {
33 t.Fatalf("metadata is copied incorrectly")
34 }
35
36 slice, _ := src.Get("key")
37 slice[0] = "z"
38 if reflect.DeepEqual(src, md) {
39 t.Fatalf("metadata is copied incorrectly")
40 }
41}
42
43func TestTTRPCNamespaceHeader(t *testing.T) {
44 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

SetMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…