MCPcopy Create free account
hub / github.com/docker/secrets-engine / TestPatternComparable

Function TestPatternComparable

x/secrets/pattern_test.go:57–66  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestPatternComparable(t *testing.T) {
58 a := MustParsePattern("foo")
59 b := MustParsePattern("foo")
60 assert.Equal(t, a, b)
61 myMap := map[Pattern]string{}
62 bar := "bar"
63 myMap[MustParsePattern("foo")] = bar
64 assert.Equal(t, bar, myMap[a])
65 assert.Equal(t, bar, myMap[b])
66}
67
68func TestPatternIncludes(t *testing.T) {
69 tests := []struct {

Callers

nothing calls this directly

Calls 1

MustParsePatternFunction · 0.85

Tested by

no test coverage detected