Merge pull request #64077 from CaoShuFeng/get_test

Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove one duplicated unit test

Unit test `TestGetAllListObjects` is exactly the same with unit test `TestGetListObjects`.



**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
/assign @soltysh 
**Release note**:
```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-05-22 08:40:23 -07:00 committed by GitHub
commit 220d16edc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 27 deletions

View File

@ -480,33 +480,6 @@ bar 0/0 0 <unknown>
}
}
func TestGetAllListObjects(t *testing.T) {
pods, _, _ := testData()
tf := cmdtesting.NewTestFactory()
defer tf.Cleanup()
codec := legacyscheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...)
tf.UnstructuredClient = &fake.RESTClient{
NegotiatedSerializer: unstructuredSerializer,
Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, pods)},
}
tf.Namespace = "test"
streams, _, buf, _ := genericclioptions.NewTestIOStreams()
cmd := NewCmdGet("kubectl", tf, streams)
cmd.SetOutput(buf)
cmd.Run(cmd, []string{"pods"})
expected := `NAME READY STATUS RESTARTS AGE
foo 0/0 0 <unknown>
bar 0/0 0 <unknown>
`
if e, a := expected, buf.String(); e != a {
t.Errorf("expected %v, got %v", e, a)
}
}
func TestGetListComponentStatus(t *testing.T) {
statuses := testComponentStatusData()