mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 13:31:52 +00:00
Merge pull request #118754 from pacoxu/fix-prometheus-client
fix metrics test with 1.16.0 prometheus client
This commit is contained in:
commit
a532733703
@ -201,5 +201,6 @@ func timelessSample(value interface{}) types.GomegaMatcher {
|
||||
"Metric": gstruct.Ignore(),
|
||||
"Value": gomega.BeNumerically("==", value),
|
||||
"Timestamp": gstruct.Ignore(),
|
||||
"Histogram": gstruct.Ignore(),
|
||||
}))
|
||||
}
|
||||
|
@ -974,5 +974,6 @@ func timelessSampleAtLeast(lower interface{}) types.GomegaMatcher {
|
||||
"Metric": gstruct.Ignore(),
|
||||
"Value": gomega.BeNumerically(">=", lower),
|
||||
"Timestamp": gstruct.Ignore(),
|
||||
"Histogram": gstruct.Ignore(),
|
||||
}))
|
||||
}
|
||||
|
@ -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(),
|
||||
}))
|
||||
}
|
||||
|
@ -174,5 +174,6 @@ func checkMetricValueGreaterThan(value interface{}) types.GomegaMatcher {
|
||||
"Metric": gstruct.Ignore(),
|
||||
"Value": gomega.BeNumerically(">", value),
|
||||
"Timestamp": gstruct.Ignore(),
|
||||
"Histogram": gstruct.Ignore(),
|
||||
}))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user