Add RESTClient Custom metrics empty test

Add testing for a previously untested path, which is tested when getting
resource metrics.
pull/6/head
mattjmcnaughton 2018-01-05 08:40:24 -05:00
parent 411881803f
commit eb688e098f
1 changed files with 10 additions and 0 deletions

View File

@ -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,