Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
  • Loading branch information
mheon committed Jun 24, 2019
1 parent 803a2b0 commit 5067433
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/e2e/generate_kube_test.go
Expand Up @@ -59,7 +59,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(kube.ExitCode()).To(Equal(0))

pod := new(v1.Pod)
err := yaml.Unmarshal(kube.OutputToString(), pod)
err := yaml.Unmarshal([]byte(kube.OutputToString()), pod)
Expect(err).To(BeNil())
})

Expand All @@ -73,7 +73,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(kube.ExitCode()).To(Equal(0))

pod := new(v1.Pod)
err := yaml.Unmarshal(kube.OutputToString(), pod)
err := yaml.Unmarshal([]byte)kube.OutputToString()), pod)
Expect(err).To(BeNil())
})

Expand All @@ -90,7 +90,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(kube.ExitCode()).To(Equal(0))

pod := new(v1.Pod)
err := yaml.Unmarshal(kube.OutputToString(), pod)
err := yaml.Unmarshal([]byte(kube.OutputToString()), pod)
Expect(err).To(BeNil())
})

Expand All @@ -114,17 +114,17 @@ var _ = Describe("Podman generate kube", func() {

It("podman generate kube on pod with ports", func() {
podName := "test"
podSession := podmanTest.Podman("pod", "create", "--name", podName, "-p", "4000:4000", "-p", "5000:5000")
podSession := podmanTest.Podman([]string{"pod", "create", "--name", podName, "-p", "4000:4000", "-p", "5000:5000"})
podSession.WaitWithDefaultTimeout()
Expect(podSession.ExitCode()).To(Equal(0))

ctr1Name := "ctr1"
ctr1Session := podmanTest.Podman("create", "--name", ctr1Name, "--pod", podName, ALPINE, "top")
ctr1Session := podmanTest.Podman([]string{"create", "--name", ctr1Name, "--pod", podName, ALPINE, "top"})
ctr1Session.WaitWithDefaultTimeout()
Expect(ctr1Session.ExitCode()).To(Equal(0))

ctr2Name := "ctr2"
ctr2Session := podmanTest.Podman("create", "--name", ctr2Name, "--pod", podName, ALPINE, "top")
ctr2Session := podmanTest.Podman([]string{"create", "--name", ctr2Name, "--pod", podName, ALPINE, "top"})
ctr2Session.WaitWithDefaultTimeout()
Expect(ctr2Session.ExitCode()).To(Equal(0))

Expand All @@ -133,7 +133,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(kube.ExitCode()).To(Equal(0))

pod := new(v1.Pod)
err := yaml.Unmarshal(kube.OutputToString(), pod)
err := yaml.Unmarshal([]byte(kube.OutputToString()), pod)
Expect(err).To(BeNil())

foundPort4000 := 0
Expand Down

0 comments on commit 5067433

Please sign in to comment.