Add support for 'worker-shutdown-timeout'

This commit is contained in:
Max Laverse 2017-08-29 11:49:18 +02:00
parent 7844415cff
commit d9e7d1eabc
4 changed files with 11 additions and 2 deletions

View file

@ -46,6 +46,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
"gzip-types": "text/html",
"proxy-real-ip-cidr": "1.1.1.1/8,2.2.2.2/24",
"bind-address": "1.1.1.1,2.2.2.2,3.3.3,2001:db8:a0b:12f0::1,3731:54:65fe:2::a7,33:33:33::33::33",
"worker-shutdown-timeout": "99s",
}
def := config.NewDefault()
def.CustomHTTPErrors = []int{300, 400}
@ -61,6 +62,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
def.ProxyRealIPCIDR = []string{"1.1.1.1/8", "2.2.2.2/24"}
def.BindAddressIpv4 = []string{"1.1.1.1", "2.2.2.2"}
def.BindAddressIpv6 = []string{"[2001:db8:a0b:12f0::1]", "[3731:54:65fe:2::a7]"}
def.WorkerShutdownTimeout = "99s"
to := ReadConfig(conf)
if diff := pretty.Compare(to, def); diff != "" {