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 <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon 2019-06-25 10:10:57 -04:00
parent 79d835457d
commit 101a5cd755

View file

@ -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