Merge pull request #118754 from pacoxu/fix-prometheus-client

fix metrics test with 1.16.0 prometheus client
This commit is contained in:
Kubernetes Prow Robot 2023-06-21 20:25:39 -07:00 committed by GitHub
commit a532733703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

View File

@ -201,5 +201,6 @@ func timelessSample(value interface{}) types.GomegaMatcher {
"Metric": gstruct.Ignore(),
"Value": gomega.BeNumerically("==", value),
"Timestamp": gstruct.Ignore(),
"Histogram": gstruct.Ignore(),
}))
}

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(),
}))
}

View File

@ -174,5 +174,6 @@ func checkMetricValueGreaterThan(value interface{}) types.GomegaMatcher {
"Metric": gstruct.Ignore(),
"Value": gomega.BeNumerically(">", value),
"Timestamp": gstruct.Ignore(),
"Histogram": gstruct.Ignore(),
}))
}