fix: default passHostHeader for file provider.

This commit is contained in:
Ludovic Fernandez 2019-09-30 18:12:04 +02:00 committed by Traefiker Bot
parent 230cd28ac9
commit 48f11900d3
22 changed files with 193 additions and 161 deletions

View file

@ -12,7 +12,8 @@ import (
var _ provider.Provider = (*Provider)(nil)
func Int(v int) *int { return &v }
func Int(v int) *int { return &v }
func Bool(v bool) *bool { return &v }
func TestLoadIngressRouteTCPs(t *testing.T) {
testCases := []struct {
@ -737,7 +738,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -786,7 +787,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -836,7 +837,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -878,7 +879,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
"default-test.route-77c62dfe9517144aeeaa": {
@ -891,7 +892,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -943,7 +944,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
"default-test.route-77c62dfe9517144aeeaa-whoami2-8080": {
@ -956,7 +957,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.4:8080",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1007,7 +1008,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
"default-test.route-77c62dfe9517144aeeaa-whoami2-8080": {
@ -1020,7 +1021,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.4:8080",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1132,7 +1133,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1190,7 +1191,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1248,7 +1249,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1305,7 +1306,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1351,7 +1352,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1397,7 +1398,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1435,7 +1436,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1472,7 +1473,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "https://10.10.0.6:8443",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1509,7 +1510,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "https://10.10.0.8:8443",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1584,7 +1585,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: true,
PassHostHeader: Bool(true),
},
},
},
@ -1620,7 +1621,7 @@ func TestLoadIngressRoutes(t *testing.T) {
URL: "http://10.10.0.2:80",
},
},
PassHostHeader: false,
PassHostHeader: Bool(false),
ResponseForwarding: &dynamic.ResponseForwarding{FlushInterval: "10s"},
},
},