feat: raw map parser.

This commit is contained in:
Fernandez Ludovic 2020-07-12 12:56:22 +02:00 committed by Traefiker Bot
parent 0186c31d59
commit c42f1b7a50
13 changed files with 901 additions and 18 deletions

View file

@ -123,18 +123,19 @@ func TestDecodeConfiguration(t *testing.T) {
"traefik.http.middlewares.Middleware17.stripprefix.prefixes": "foobar, fiibar",
"traefik.http.middlewares.Middleware18.stripprefixregex.regex": "foobar, fiibar",
"traefik.http.middlewares.Middleware19.compress": "true",
"traefik.http.routers.Router0.entrypoints": "foobar, fiibar",
"traefik.http.routers.Router0.middlewares": "foobar, fiibar",
"traefik.http.routers.Router0.priority": "42",
"traefik.http.routers.Router0.rule": "foobar",
"traefik.http.routers.Router0.tls": "true",
"traefik.http.routers.Router0.service": "foobar",
"traefik.http.routers.Router1.entrypoints": "foobar, fiibar",
"traefik.http.routers.Router1.middlewares": "foobar, fiibar",
"traefik.http.routers.Router1.priority": "42",
"traefik.http.routers.Router1.rule": "foobar",
"traefik.http.routers.Router1.service": "foobar",
"traefik.http.middlewares.Middleware20.plugin.tomato.aaa": "foo1",
"traefik.http.middlewares.Middleware20.plugin.tomato.bbb": "foo2",
"traefik.http.routers.Router0.entrypoints": "foobar, fiibar",
"traefik.http.routers.Router0.middlewares": "foobar, fiibar",
"traefik.http.routers.Router0.priority": "42",
"traefik.http.routers.Router0.rule": "foobar",
"traefik.http.routers.Router0.tls": "true",
"traefik.http.routers.Router0.service": "foobar",
"traefik.http.routers.Router1.entrypoints": "foobar, fiibar",
"traefik.http.routers.Router1.middlewares": "foobar, fiibar",
"traefik.http.routers.Router1.priority": "42",
"traefik.http.routers.Router1.rule": "foobar",
"traefik.http.routers.Router1.service": "foobar",
"traefik.http.services.Service0.loadbalancer.healthcheck.headers.name0": "foobar",
"traefik.http.services.Service0.loadbalancer.healthcheck.headers.name1": "foobar",
@ -574,6 +575,14 @@ func TestDecodeConfiguration(t *testing.T) {
},
},
},
"Middleware20": {
Plugin: map[string]dynamic.PluginConf{
"tomato": {
"aaa": "foo1",
"bbb": "foo2",
},
},
},
},
Services: map[string]*dynamic.Service{
"Service0": {
@ -897,6 +906,14 @@ func TestEncodeConfiguration(t *testing.T) {
RetryExpression: "foobar",
},
},
"Middleware20": {
Plugin: map[string]dynamic.PluginConf{
"tomato": {
"aaa": "foo1",
"bbb": "foo2",
},
},
},
"Middleware3": {
Chain: &dynamic.Chain{
Middlewares: []string{
@ -1205,6 +1222,8 @@ func TestEncodeConfiguration(t *testing.T) {
"traefik.HTTP.Middlewares.Middleware17.StripPrefix.ForceSlash": "true",
"traefik.HTTP.Middlewares.Middleware18.StripPrefixRegex.Regex": "foobar, fiibar",
"traefik.HTTP.Middlewares.Middleware19.Compress": "true",
"traefik.HTTP.Middlewares.Middleware20.Plugin.tomato.aaa": "foo1",
"traefik.HTTP.Middlewares.Middleware20.Plugin.tomato.bbb": "foo2",
"traefik.HTTP.Routers.Router0.EntryPoints": "foobar, fiibar",
"traefik.HTTP.Routers.Router0.Middlewares": "foobar, fiibar",