mirror of https://github.com/k3s-io/k3s
Add RESTClient Custom metrics empty test
Add testing for a previously untested path, which is tested when getting resource metrics.pull/6/head
parent
411881803f
commit
eb688e098f
|
@ -249,6 +249,16 @@ func TestRESTClientQpsSumEqualZero(t *testing.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) {
|
||||
tc := restClientTestCase{
|
||||
resourceName: v1.ResourceCPU,
|
||||
|
|
Loading…
Reference in New Issue