MCPcopy
hub / github.com/prometheus/client_golang / TestDeleteWithConstraints

Function TestDeleteWithConstraints

prometheus/vec_test.go:49–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestDeleteWithConstraints(t *testing.T) {
50 vec := V2.NewGaugeVec(GaugeVecOpts{
51 GaugeOpts{
52 Name: "test",
53 Help: "helpless",
54 },
55 ConstrainedLabels{
56 {Name: "l1"},
57 {Name: "l2", Constraint: func(s string) string { return "x" + s }},
58 },
59 })
60 testDelete(t, vec)
61}
62
63func testDelete(t *testing.T, vec *GaugeVec) {
64 if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want {

Callers

nothing calls this directly

Calls 2

testDeleteFunction · 0.85
NewGaugeVecMethod · 0.45

Tested by

no test coverage detected