fix metrics test with 1.16.0 prometheus client

This commit is contained in:
Paco Xu 2023-06-20 14:34:44 +08:00
parent c0147ff528
commit bbae445d17
2 changed files with 4 additions and 1 deletions

View File

@ -974,5 +974,6 @@ func timelessSampleAtLeast(lower interface{}) types.GomegaMatcher {
"Metric": gstruct.Ignore(),
"Value": gomega.BeNumerically(">=", lower),
"Timestamp": gstruct.Ignore(),
"Histogram": gstruct.Ignore(),
}))
}

View File

@ -161,5 +161,7 @@ func boundedSample(lower, upper interface{}) types.GomegaMatcher {
gomega.BeTemporally(">=", time.Now().Add(-maxStatsAge)),
// Now() is the test start time, not the match time, so permit a few extra minutes.
gomega.BeTemporally("<", time.Now().Add(2*time.Minute))),
)}))
),
"Histogram": gstruct.Ignore(),
}))
}