chore: update linter
This commit is contained in:
parent
9c50129520
commit
f437fb4230
38 changed files with 796 additions and 830 deletions
|
@ -13,8 +13,7 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/types"
|
||||
)
|
||||
|
||||
func Int(v int) *int { return &v }
|
||||
func Bool(v bool) *bool { return &v }
|
||||
func pointer[T any](v T) *T { return &v }
|
||||
|
||||
func TestGetConfigurationAPIErrors(t *testing.T) {
|
||||
fakeClient := newFakeClient(true, marathon.Applications{})
|
||||
|
@ -73,7 +72,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -146,7 +145,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -202,7 +201,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -248,7 +247,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:80",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(100),
|
||||
TerminationDelay: pointer(100),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -314,7 +313,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:8081",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -378,7 +377,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:8083",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -431,7 +430,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:8080",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
"bar": {LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||
Servers: []dynamic.Server{
|
||||
|
@ -439,7 +438,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:8081",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -487,7 +486,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:81",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -533,7 +532,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
@ -580,7 +579,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -620,7 +619,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -673,7 +672,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -716,7 +715,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"Service2": {
|
||||
|
@ -726,7 +725,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -837,7 +836,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"app2": {
|
||||
|
@ -847,7 +846,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -905,7 +904,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"app2": {
|
||||
|
@ -915,7 +914,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -962,7 +961,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"app2": {
|
||||
|
@ -972,7 +971,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1026,7 +1025,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1073,7 +1072,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"app2": {
|
||||
|
@ -1083,7 +1082,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1130,7 +1129,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1178,7 +1177,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "h2c://localhost:90",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1220,7 +1219,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
"Service2": {
|
||||
|
@ -1230,7 +1229,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:8080",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1459,7 +1458,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1507,7 +1506,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1554,7 +1553,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1593,7 +1592,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:80",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(100),
|
||||
TerminationDelay: pointer(100),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1679,7 +1678,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:80",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(100),
|
||||
TerminationDelay: pointer(100),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1728,7 +1727,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:8080",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(100),
|
||||
TerminationDelay: pointer(100),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1824,7 +1823,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:8080",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(200),
|
||||
TerminationDelay: pointer(200),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1874,7 +1873,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
Address: "localhost:8080",
|
||||
},
|
||||
},
|
||||
TerminationDelay: Int(100),
|
||||
TerminationDelay: pointer(100),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1900,7 +1899,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1964,7 +1963,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -2012,7 +2011,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
URL: "http://localhost:80",
|
||||
},
|
||||
},
|
||||
PassHostHeader: Bool(true),
|
||||
PassHostHeader: pointer(true),
|
||||
}},
|
||||
},
|
||||
ServersTransports: map[string]*dynamic.ServersTransport{},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue