Commit 0b74fa12 authored by oulinbao's avatar oulinbao Committed by oulinbao

Refactor describe.go with PrefixWriter

parent e6c57c65
......@@ -363,7 +363,8 @@ func TestDescribeContainers(t *testing.T) {
ContainerStatuses: []api.ContainerStatus{testCase.status},
},
}
describeContainers("Containers", pod.Spec.Containers, pod.Status.ContainerStatuses, EnvValueRetriever(&pod), out, "")
writer := &PrefixWriter{out}
describeContainers("Containers", pod.Spec.Containers, pod.Status.ContainerStatuses, EnvValueRetriever(&pod), writer, "")
output := out.String()
for _, expected := range testCase.expectedElements {
if !strings.Contains(output, expected) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment