From 101a5cd7556433f81238032bf9c44bbbb6b4cabc Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 25 Jun 2019 10:10:57 -0400 Subject: Use a different method to retrieve YAML output in tests OutputToString() was mangling newlines, which made YAML parsers very, very angry. But not angry enough to actually error, that would be too easy. Just angry enough to silently not decode anything. Signed-off-by: Matthew Heon --- test/e2e/generate_kube_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/e2e') diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go index 7871546c7..a51b42d9a 100644 --- a/test/e2e/generate_kube_test.go +++ b/test/e2e/generate_kube_test.go @@ -133,7 +133,7 @@ var _ = Describe("Podman generate kube", func() { Expect(kube.ExitCode()).To(Equal(0)) pod := new(v1.Pod) - err := yaml.Unmarshal([]byte(kube.OutputToString()), pod) + err := yaml.Unmarshal(kube.Out.Contents(), pod) Expect(err).To(BeNil()) foundPort4000 := 0 -- cgit v1.2.3-54-g00ecf