summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/generate_kube_test.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index a51b42d9a..1df54f753 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -59,8 +59,14 @@ 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())
+
+ numContainers := 0
+ for range pod.Spec.Containers {
+ numContainers = numContainers + 1
+ }
+ Expect(numContainers).To(Equal(1))
})
It("podman generate service kube on container", func() {
@@ -72,9 +78,11 @@ var _ = Describe("Podman generate kube", func() {
kube.WaitWithDefaultTimeout()
Expect(kube.ExitCode()).To(Equal(0))
- pod := new(v1.Pod)
- err := yaml.Unmarshal([]byte(kube.OutputToString()), pod)
- Expect(err).To(BeNil())
+ // TODO - test generated YAML - service produces multiple
+ // structs.
+ // pod := new(v1.Pod)
+ // err := yaml.Unmarshal([]byte(kube.OutputToString()), pod)
+ // Expect(err).To(BeNil())
})
It("podman generate kube on pod", func() {
@@ -90,8 +98,14 @@ 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())
+
+ numContainers := 0
+ for range pod.Spec.Containers {
+ numContainers = numContainers + 1
+ }
+ Expect(numContainers).To(Equal(1))
})
It("podman generate service kube on pod", func() {