mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-04 14:58:47 +00:00
Revert "bind: support multiple values (#2128)"
This reverts commit 3a810c6502.
This commit is contained in:
parent
3a810c6502
commit
b7091650f8
8 changed files with 38 additions and 114 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue