diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-30 05:29:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 05:29:20 -0400 |
commit | 4dc87c2a3a45db32fbded8b4a0a23d874b3e464a (patch) | |
tree | 75de4792437cb0f2e6d0209d1213910313bea027 /test | |
parent | 1846070f051d36950846787e0045a3ad4724ed66 (diff) | |
parent | 2ce78aace682084393f1cda07c2bca0bbb773c95 (diff) | |
download | podman-4dc87c2a3a45db32fbded8b4a0a23d874b3e464a.tar.gz podman-4dc87c2a3a45db32fbded8b4a0a23d874b3e464a.tar.bz2 podman-4dc87c2a3a45db32fbded8b4a0a23d874b3e464a.zip |
Merge pull request #10821 from jwhonce/wip/connection
Enhance system connection add URL input
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/system_connection_test.go | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/test/e2e/system_connection_test.go b/test/e2e/system_connection_test.go index 7c922a648..21398887a 100644 --- a/test/e2e/system_connection_test.go +++ b/test/e2e/system_connection_test.go @@ -53,7 +53,7 @@ var _ = Describe("podman system connection", func() { GinkgoWriter.Write([]byte(timedResult)) }) - It("add", func() { + It("add ssh://", func() { cmd := []string{"system", "connection", "add", "--default", "--identity", "~/.ssh/id_rsa", @@ -94,6 +94,68 @@ var _ = Describe("podman system connection", func() { )) }) + It("add UDS", func() { + cmd := []string{"system", "connection", "add", + "QA-UDS", + "unix:///run/podman/podman.sock", + } + session := podmanTest.Podman(cmd) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.Out).Should(Say("")) + + cfg, err := config.ReadCustomConfig() + Expect(err).ShouldNot(HaveOccurred()) + Expect(cfg.Engine.ActiveService).To(Equal("QA-UDS")) + Expect(cfg.Engine.ServiceDestinations["QA-UDS"]).To(Equal( + config.Destination{ + URI: "unix:///run/podman/podman.sock", + Identity: "", + }, + )) + + cmd = []string{"system", "connection", "add", + "QA-UDS1", + "--socket-path", "/run/user/podman/podman.sock", + "unix:///run/podman/podman.sock", + } + session = podmanTest.Podman(cmd) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.Out).Should(Say("")) + + cfg, err = config.ReadCustomConfig() + Expect(err).ShouldNot(HaveOccurred()) + Expect(cfg.Engine.ActiveService).To(Equal("QA-UDS")) + Expect(cfg.Engine.ServiceDestinations["QA-UDS1"]).To(Equal( + config.Destination{ + URI: "unix:///run/user/podman/podman.sock", + Identity: "", + }, + )) + }) + + It("add tcp", func() { + cmd := []string{"system", "connection", "add", + "QA-TCP", + "tcp://localhost:8080", + } + session := podmanTest.Podman(cmd) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.Out).Should(Say("")) + + cfg, err := config.ReadCustomConfig() + Expect(err).ShouldNot(HaveOccurred()) + Expect(cfg.Engine.ActiveService).To(Equal("QA-TCP")) + Expect(cfg.Engine.ServiceDestinations["QA-TCP"]).To(Equal( + config.Destination{ + URI: "tcp://localhost:8080", + Identity: "", + }, + )) + }) + It("remove", func() { cmd := []string{"system", "connection", "add", "--default", |