mirror of
https://github.com/containers/podman.git
synced 2025-06-03 20:33:20 +08:00
Fix tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -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())
|
||||
})
|
||||
|
||||
@ -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())
|
||||
})
|
||||
|
||||
@ -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())
|
||||
})
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
Reference in New Issue
Block a user