MCPcopy
hub / github.com/grafana/dskit / TestMetadata_Get

Function TestMetadata_Get

tenant/metadata_test.go:79–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestMetadata_Get(t *testing.T) {
80 var md Metadata
81 md.Set("key", "value")
82 val, ok := md.Get("key")
83 assert.True(t, ok)
84 assert.Equal(t, "value", val)
85
86 val, ok = md.Get("missing")
87 assert.False(t, ok)
88 assert.Equal(t, "", val)
89}
90
91func TestMetadata_DivideIter(t *testing.T) {
92 tests := []struct {

Callers

nothing calls this directly

Calls 3

SetMethod · 0.95
GetMethod · 0.95
EqualMethod · 0.45

Tested by

no test coverage detected