summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-06-29 16:24:03 -0700
committerJhon Honce <jhonce@redhat.com>2021-06-29 16:24:03 -0700
commit2ce78aace682084393f1cda07c2bca0bbb773c95 (patch)
tree75de4792437cb0f2e6d0209d1213910313bea027 /test
parent1846070f051d36950846787e0045a3ad4724ed66 (diff)
downloadpodman-2ce78aace682084393f1cda07c2bca0bbb773c95.tar.gz
podman-2ce78aace682084393f1cda07c2bca0bbb773c95.tar.bz2
podman-2ce78aace682084393f1cda07c2bca0bbb773c95.zip
Enhance system connection add URL input
* Add support for the tcp and unix schemes in connection URLs. Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/system_connection_test.go64
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",