Bump AWS SDK to v2
This commit is contained in:
parent
7cfd10db62
commit
14e400bcd0
8 changed files with 352 additions and 387 deletions
|
@ -4,7 +4,8 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
|
||||
ecstypes "github.com/aws/aws-sdk-go-v2/service/ecs/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/traefik/traefik/v2/pkg/config/dynamic"
|
||||
|
@ -29,10 +30,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
id("1"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("10.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 1337, "TCP"),
|
||||
mPort(0, 1337, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -83,10 +84,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -139,10 +140,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
"traefik.domain": "foo.bar",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -193,10 +194,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -241,10 +242,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -289,10 +290,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -380,10 +381,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -418,10 +419,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -456,10 +457,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -492,10 +493,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -545,10 +546,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -556,10 +557,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test2"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -625,10 +626,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -637,10 +638,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -695,10 +696,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -752,10 +753,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.service": "Service1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -806,10 +807,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -861,10 +862,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -917,10 +918,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -977,10 +978,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.service": "Service1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1032,10 +1033,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1046,10 +1047,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1091,10 +1092,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1105,10 +1106,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1119,10 +1120,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1164,10 +1165,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1178,10 +1179,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1236,10 +1237,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1298,10 +1299,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1312,10 +1313,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1377,10 +1378,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1391,10 +1392,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "41",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1450,10 +1451,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1464,10 +1465,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "41",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1478,10 +1479,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "40",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.3"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1540,10 +1541,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1554,10 +1555,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`bar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1607,10 +1608,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1621,10 +1622,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`bar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1635,10 +1636,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foobar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.3"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1691,10 +1692,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1706,10 +1707,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1763,10 +1764,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1776,10 +1777,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1835,10 +1836,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.wrong.label": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1891,10 +1892,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1947,10 +1948,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.port": "8040",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2007,11 +2008,11 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.LoadBalancer.server.port": "4444",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(4444, 32123, "tcp"),
|
||||
mPort(4445, 32124, "tcp"),
|
||||
mPort(4444, 32123, ecstypes.TransportProtocolTcp),
|
||||
mPort(4445, 32124, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2077,10 +2078,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.LoadBalancer.server.port": "8080",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2134,7 +2135,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(),
|
||||
),
|
||||
|
@ -2170,7 +2171,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(),
|
||||
),
|
||||
|
@ -2206,10 +2207,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2244,11 +2245,11 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mHealthStatus("UNHEALTHY"),
|
||||
mHealthStatus(ecstypes.HealthStatusUnhealthy),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2283,10 +2284,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNamePending),
|
||||
mState(ec2types.InstanceStateNamePending),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2321,10 +2322,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tags": "foo",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2360,10 +2361,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tags": "foo",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2417,10 +2418,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Test.middlewares": "Middleware1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2484,10 +2485,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.Test.middlewares": "Middleware1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2546,10 +2547,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.foo.tls": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2601,10 +2602,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.routers.foo.entrypoints": "mydns",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "udp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolUdp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2654,10 +2655,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.foo.tls": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2705,10 +2706,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.foo.loadbalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2763,10 +2764,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.foo.loadbalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "udp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolUdp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2818,10 +2819,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2834,10 +2835,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2910,10 +2911,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.foo.loadbalancer.server.port": "8080",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2959,10 +2960,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.foo.loadbalancer.terminationdelay": "200",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3010,10 +3011,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tls.stores.default.defaultgeneratedcert.domain.sans": "foobar, fiibar",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue