Skip to content

Commit

Permalink
DROPME debugging for 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 79d8354 commit 6b0ff18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/e2e/generate_kube_test.go
Expand Up @@ -3,6 +3,7 @@
package integration

import (
"fmt"
"os"
"path/filepath"

Expand Down Expand Up @@ -132,15 +133,21 @@ var _ = Describe("Podman generate kube", func() {
kube.WaitWithDefaultTimeout()
Expect(kube.ExitCode()).To(Equal(0))

fmt.Printf("POD YAML IS %s\n", kube.OutputToString())

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

fmt.Printf("# of containers in pod is %d\n", len(pod.Spec.Containers))

foundPort4000 := 0
foundPort5000 := 0
foundOtherPort := 0
for _, ctr := range pod.Spec.Containers {
fmt.Printf("# of ports in container %s in pod is %d\n", ctr.Name, len(pod.Spec.Containers))
for _, port := range ctr.Ports {
fmt.Printf("Port is %v\n", port)
if port.HostPort == 4000 {
foundPort4000 = foundPort4000 + 1
} else if port.HostPort == 5000 {
Expand Down

0 comments on commit 6b0ff18

Please sign in to comment.