Remove Deprecated Step 1
This commit is contained in:
parent
1d53077fc7
commit
8627256e74
68 changed files with 168 additions and 1695 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/containous/flaeg"
|
||||
"github.com/containous/flaeg/parse"
|
||||
"github.com/containous/mux"
|
||||
"github.com/containous/traefik/configuration"
|
||||
"github.com/containous/traefik/middlewares"
|
||||
|
@ -30,9 +30,9 @@ func TestPrepareServerTimeouts(t *testing.T) {
|
|||
desc: "full configuration",
|
||||
globalConfig: configuration.GlobalConfiguration{
|
||||
RespondingTimeouts: &configuration.RespondingTimeouts{
|
||||
IdleTimeout: flaeg.Duration(10 * time.Second),
|
||||
ReadTimeout: flaeg.Duration(12 * time.Second),
|
||||
WriteTimeout: flaeg.Duration(14 * time.Second),
|
||||
IdleTimeout: parse.Duration(10 * time.Second),
|
||||
ReadTimeout: parse.Duration(12 * time.Second),
|
||||
WriteTimeout: parse.Duration(14 * time.Second),
|
||||
},
|
||||
},
|
||||
expectedIdleTimeout: time.Duration(10 * time.Second),
|
||||
|
@ -46,27 +46,6 @@ func TestPrepareServerTimeouts(t *testing.T) {
|
|||
expectedReadTimeout: time.Duration(0 * time.Second),
|
||||
expectedWriteTimeout: time.Duration(0 * time.Second),
|
||||
},
|
||||
{
|
||||
desc: "deprecated IdleTimeout configured",
|
||||
globalConfig: configuration.GlobalConfiguration{
|
||||
IdleTimeout: flaeg.Duration(45 * time.Second),
|
||||
},
|
||||
expectedIdleTimeout: time.Duration(45 * time.Second),
|
||||
expectedReadTimeout: time.Duration(0 * time.Second),
|
||||
expectedWriteTimeout: time.Duration(0 * time.Second),
|
||||
},
|
||||
{
|
||||
desc: "deprecated and new IdleTimeout configured",
|
||||
globalConfig: configuration.GlobalConfiguration{
|
||||
IdleTimeout: flaeg.Duration(45 * time.Second),
|
||||
RespondingTimeouts: &configuration.RespondingTimeouts{
|
||||
IdleTimeout: flaeg.Duration(80 * time.Second),
|
||||
},
|
||||
},
|
||||
expectedIdleTimeout: time.Duration(45 * time.Second),
|
||||
expectedReadTimeout: time.Duration(0 * time.Second),
|
||||
expectedWriteTimeout: time.Duration(0 * time.Second),
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
|
@ -212,7 +191,7 @@ func setupListenProvider(throttleDuration time.Duration) (server *Server, stop c
|
|||
EntryPoints: configuration.EntryPoints{
|
||||
"http": &configuration.EntryPoint{},
|
||||
},
|
||||
ProvidersThrottleDuration: flaeg.Duration(throttleDuration),
|
||||
ProvidersThrottleDuration: parse.Duration(throttleDuration),
|
||||
}
|
||||
|
||||
server = NewServer(globalConfig, nil, nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue