16561: Handle implicit port number in ws:// and wss:// urls.
[arvados.git] / lib / service / cmd_test.go
index 7a1f98a8f0af2c3ac188fe15be171f6ca1e26f6b..7db91092745e2e4886f0b1b35a3015da0f0387fc 100644 (file)
@@ -64,8 +64,6 @@ func (*Suite) TestGetListenAddress(c *check.C) {
                },
                { // implicit port 80 in InternalURLs
                        internalURLs:     map[string]string{"http://localhost/": ""},
                },
                { // implicit port 80 in InternalURLs
                        internalURLs:     map[string]string{"http://localhost/": ""},
-                       expectListen:     "http://localhost/",
-                       expectInternal:   "http://localhost/",
                        expectErrorMatch: `.*:80: bind: permission denied`,
                },
                { // implicit port 443 in InternalURLs
                        expectErrorMatch: `.*:80: bind: permission denied`,
                },
                { // implicit port 443 in InternalURLs
@@ -73,6 +71,10 @@ func (*Suite) TestGetListenAddress(c *check.C) {
                        expectListen:   "http://localhost:" + unusedPort + "/",
                        expectInternal: "https://host.example/",
                },
                        expectListen:   "http://localhost:" + unusedPort + "/",
                        expectInternal: "https://host.example/",
                },
+               { // implicit port 443 in ListenURL
+                       internalURLs:     map[string]string{"wss://host.example/": "wss://localhost/"},
+                       expectErrorMatch: `.*:443: bind: permission denied`,
+               },
                {
                        internalURLs:   map[string]string{"https://hostname.example/": "http://localhost:8000/"},
                        expectListen:   "http://localhost:8000/",
                {
                        internalURLs:   map[string]string{"https://hostname.example/": "http://localhost:8000/"},
                        expectListen:   "http://localhost:8000/",