mirror of https://github.com/k3s-io/k3s
Refactor describe.go with PrefixWriter
parent
e6c57c6569
commit
0b74fa12b8
File diff suppressed because it is too large
Load Diff
|
@ -363,7 +363,8 @@ func TestDescribeContainers(t *testing.T) {
|
||||||
ContainerStatuses: []api.ContainerStatus{testCase.status},
|
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()
|
output := out.String()
|
||||||
for _, expected := range testCase.expectedElements {
|
for _, expected := range testCase.expectedElements {
|
||||||
if !strings.Contains(output, expected) {
|
if !strings.Contains(output, expected) {
|
||||||
|
|
Loading…
Reference in New Issue