diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go b/staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go index c306e4d0779..34ae6bc5f4e 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go @@ -248,15 +248,15 @@ func TestDescribeHelpMessage(t *testing.T) { func TestDescribeNoResourcesFound(t *testing.T) { testNS := "testns" testCases := []struct { - name string - flags map[string]string - namespace string - expectedOutput string - expectedErr string + name string + flags map[string]string + namespace string + expectedOutput string + expectedErr string }{ { name: "all namespaces", - flags: map[string]string{"all-namespaces": "true"}, + flags: map[string]string{"all-namespaces": "true"}, expectedOutput: "", expectedErr: "No resources found\n", }, diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/top/top_pod_test.go b/staging/src/k8s.io/kubectl/pkg/cmd/top/top_pod_test.go index ed5f8f683fd..a51caad6b3e 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/top/top_pod_test.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/top/top_pod_test.go @@ -452,12 +452,12 @@ func TestTopPodWithMetricsServer(t *testing.T) { func TestTopPodNoResourcesFound(t *testing.T) { testNS := "testns" testCases := []struct { - name string - options *TopPodOptions - namespace string - expectedOutput string - expectedErr string - expectedPath string + name string + options *TopPodOptions + namespace string + expectedOutput string + expectedErr string + expectedPath string }{ { name: "all namespaces", @@ -501,7 +501,7 @@ func TestTopPodNoResourcesFound(t *testing.T) { return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: ioutil.NopCloser(bytes.NewReader([]byte(apibody)))}, nil case p == "/apis": return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: ioutil.NopCloser(bytes.NewReader([]byte(apisbodyWithMetrics)))}, nil - case p == "/api/v1/namespaces/" + testNS + "/pods": + case p == "/api/v1/namespaces/"+testNS+"/pods": // Top Pod calls this endpoint to check if there are pods whenever it gets no metrics, // so we need to return no pods for this test scenario body, _ := marshallBody(metricsv1alpha1api.PodMetricsList{