(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func 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 | |
| 63 | func testDelete(t *testing.T, vec *GaugeVec) { |
| 64 | if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want { |
nothing calls this directly
no test coverage detected