Revert "bind: support multiple values (#2128)"

This reverts commit 3a810c6502.
This commit is contained in:
Matthew Holt
2018-11-27 15:57:38 -07:00
parent 3a810c6502
commit b7091650f8
8 changed files with 38 additions and 114 deletions
-26
View File
@@ -15,7 +15,6 @@
package httpserver
import (
"reflect"
"strings"
"testing"
@@ -348,28 +347,3 @@ func TestHideCaddyfile(t *testing.T) {
}
t.Fatal("Caddyfile missing from HiddenFiles")
}
func TestGroupSiteConfigsByListenAddr(t *testing.T) {
cfg := []*SiteConfig{
{
ListenHosts: []string{"127.0.0.1", "::1"},
},
{
Addr: Address{
Port: "80",
},
},
}
groups, err := groupSiteConfigsByListenAddr(cfg)
if err != nil {
t.Fatal("Failed to group SiteConfigs by listen address")
}
actual := []string{}
for k := range groups {
actual = append(actual, k)
}
expected := []string{"127.0.0.1:" + Port, "[::1]:" + Port, ":80"}
if !reflect.DeepEqual(actual, expected) {
t.Errorf("Expected listen on %#v, but got %#v", expected, actual)
}
}