summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorNiall Crowe <nicrowe@redhat.com>2022-08-04 09:02:54 +0100
committerNiall Crowe <nicrowe@redhat.com>2022-08-11 16:58:24 +0100
commitd856fb43e11b3a4a93b423d330ce3435afddde4b (patch)
treeb5533938756de79d6340e3a5802ac1a1700fd142 /test/e2e
parent92bbae40de3c48ee6b4692ab9e4d7cc14db242bb (diff)
downloadpodman-d856fb43e11b3a4a93b423d330ce3435afddde4b.tar.gz
podman-d856fb43e11b3a4a93b423d330ce3435afddde4b.tar.bz2
podman-d856fb43e11b3a4a93b423d330ce3435afddde4b.zip
Add "podman kube generate" command
"podman kube generate" creates Kubernetes YAML from Podman containers, pods or volumes. Users will still be able to use "podman generate kube" as an alias of "kube generate". Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/generate_kube_test.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index 5e9881c4f..142f32d19 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -58,7 +58,7 @@ var _ = Describe("Podman generate kube", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "top"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "top"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -115,7 +115,7 @@ var _ = Describe("Podman generate kube", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "test"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "test"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -130,7 +130,7 @@ var _ = Describe("Podman generate kube", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "-s", "test-ctr"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "-s", "test-ctr"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -182,7 +182,7 @@ var _ = Describe("Podman generate kube", func() {
pod2.WaitWithDefaultTimeout()
Expect(pod2).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "pod1", "pod2"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "pod1", "pod2"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -203,7 +203,7 @@ var _ = Describe("Podman generate kube", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "toppod"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "toppod"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -398,7 +398,7 @@ var _ = Describe("Podman generate kube", func() {
ctr2Session.WaitWithDefaultTimeout()
Expect(ctr2Session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", podName})
+ kube := podmanTest.Podman([]string{"kube", "generate", podName})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -500,7 +500,7 @@ var _ = Describe("Podman generate kube", func() {
ctr1Session.WaitWithDefaultTimeout()
Expect(ctr1Session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", podName})
+ kube := podmanTest.Podman([]string{"kube", "generate", podName})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -562,7 +562,7 @@ var _ = Describe("Podman generate kube", func() {
ctr2Session.WaitWithDefaultTimeout()
Expect(ctr2Session).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", podName})
+ kube := podmanTest.Podman([]string{"kube", "generate", podName})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -665,7 +665,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(inspect.OutputToString()).To(ContainSubstring("100:200"))
outputFile := filepath.Join(podmanTest.RunRoot, "pod.yaml")
- kube := podmanTest.Podman([]string{"generate", "kube", "-f", outputFile, podName})
+ kube := podmanTest.Podman([]string{"kube", "generate", "-f", outputFile, podName})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -788,7 +788,7 @@ var _ = Describe("Podman generate kube", func() {
Expect(session).Should(Exit(0))
outputFile := filepath.Join(podmanTest.RunRoot, "pod.yaml")
- kube := podmanTest.Podman([]string{"generate", "kube", podName, "-f", outputFile})
+ kube := podmanTest.Podman([]string{"kube", "generate", podName, "-f", outputFile})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -857,7 +857,7 @@ var _ = Describe("Podman generate kube", func() {
pod2.WaitWithDefaultTimeout()
Expect(pod2).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "top1", "top2"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "top1", "top2"})
kube.WaitWithDefaultTimeout()
Expect(kube).To(ExitWithError())
})
@@ -911,7 +911,7 @@ var _ = Describe("Podman generate kube", func() {
top.WaitWithDefaultTimeout()
Expect(top).Should(Exit(0))
- kube := podmanTest.Podman([]string{"generate", "kube", "pod1"})
+ kube := podmanTest.Podman([]string{"kube", "generate", "pod1"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -973,7 +973,7 @@ var _ = Describe("Podman generate kube", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube = podmanTest.Podman([]string{"generate", "kube", "test1"})
+ kube = podmanTest.Podman([]string{"kube", "generate", "test1"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
@@ -1026,7 +1026,7 @@ ENTRYPOINT ["sleep"]`
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- kube = podmanTest.Podman([]string{"generate", "kube", "testpod-2"})
+ kube = podmanTest.Podman([]string{"kube", "generate", "testpod-2"})
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))