mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Add RESTClient Custom metrics empty test
Add testing for a previously untested path, which is tested when getting resource metrics.
This commit is contained in:
parent
411881803f
commit
eb688e098f
@ -249,6 +249,16 @@ func TestRESTClientQpsSumEqualZero(t *testing.T) {
|
|||||||
tc.runTest(t)
|
tc.runTest(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRESTClientQpsEmptyMetrics(t *testing.T) {
|
||||||
|
tc := restClientTestCase{
|
||||||
|
metricName: "qps",
|
||||||
|
desiredError: fmt.Errorf("no metrics returned from custom metrics API"),
|
||||||
|
reportedMetricPoints: []metricPoint{},
|
||||||
|
}
|
||||||
|
|
||||||
|
tc.runTest(t)
|
||||||
|
}
|
||||||
|
|
||||||
func TestRESTClientCPUEmptyMetrics(t *testing.T) {
|
func TestRESTClientCPUEmptyMetrics(t *testing.T) {
|
||||||
tc := restClientTestCase{
|
tc := restClientTestCase{
|
||||||
resourceName: v1.ResourceCPU,
|
resourceName: v1.ResourceCPU,
|
||||||
|
Loading…
Reference in New Issue
Block a user