MCPcopy
hub / github.com/helm/helm / TestFilterSystemLabels

Function TestFilterSystemLabels

pkg/storage/driver/util_test.go:41–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestFilterSystemLabels(t *testing.T) {
42 var tests = [][2]map[string]string{
43 {nil, map[string]string{}},
44 {map[string]string{}, map[string]string{}},
45 {map[string]string{
46 "name": "name",
47 "owner": "owner",
48 "status": "status",
49 "version": "version",
50 "createdAt": "createdAt",
51 "modifiedAt": "modifiedAt",
52 }, map[string]string{}},
53 {map[string]string{
54 "StaTus": "status",
55 "name": "name",
56 "owner": "owner",
57 "key": "value",
58 }, map[string]string{
59 "StaTus": "status",
60 "key": "value",
61 }},
62 {map[string]string{
63 "key1": "value1",
64 "key2": "value2",
65 }, map[string]string{
66 "key1": "value1",
67 "key2": "value2",
68 }},
69 }
70 for _, test := range tests {
71 if output := filterSystemLabels(test[0]); !reflect.DeepEqual(test[1], output) {
72 t.Errorf("Expected {%v}, got {%v}", test[1], output)
73 }
74 }
75}
76
77func TestContainsSystemLabels(t *testing.T) {
78 var tests = []struct {

Callers

nothing calls this directly

Calls 1

filterSystemLabelsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…