summaryrefslogtreecommitdiff
path: root/listeners_test.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-10-11 14:25:39 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-10-11 14:25:39 -0600
commit1e31be8de0d1d5587348619225456a793cb30f7f (patch)
treefa3fca930b8ae02649471698950a60cce8afc539 /listeners_test.go
parent4aa3af4b78addcf65ce6b254be10f006bae1c9ac (diff)
reverse_proxy: Allow dynamic backends (closes #990 and #1539)
This PR enables the use of placeholders in an upstream's Dial address. A Dial address must represent precisely one socket after replacements. See also #998 and #1639.
Diffstat (limited to 'listeners_test.go')
-rw-r--r--listeners_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/listeners_test.go b/listeners_test.go
index 11d3980..bdddf32 100644
--- a/listeners_test.go
+++ b/listeners_test.go
@@ -138,6 +138,10 @@ func TestJoinNetworkAddress(t *testing.T) {
network: "unix", host: "/foo/bar", port: "",
expect: "unix//foo/bar",
},
+ {
+ network: "", host: "::1", port: "1234",
+ expect: "[::1]:1234",
+ },
} {
actual := JoinNetworkAddress(tc.network, tc.host, tc.port)
if actual != tc.expect {