Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-24 20:51:40 +01:00
parent fe92e19abb
commit bb48464106

View File

@@ -171,17 +171,19 @@ func TestTrafficLocality(t *testing.T) {
{
cla: &xdspb.ClusterLoadAssignment{
ClusterName: "web",
Endpoints: append(endpointsWithLocality([]EndpointHealth{
{"127.0.0.1", 18008, corepb.HealthStatus_HEALTHY},
{"127.0.0.2", 18008, corepb.HealthStatus_HEALTHY}},
xds.Locality{Region: "us"}),
Endpoints: append(
endpointsWithLocality([]EndpointHealth{
{"127.0.0.1", 18008, corepb.HealthStatus_HEALTHY},
{"127.0.0.2", 18008, corepb.HealthStatus_HEALTHY}},
xds.Locality{Region: "us"}),
endpointsWithLocality([]EndpointHealth{
{"127.0.1.1", 18008, corepb.HealthStatus_HEALTHY},
{"127.0.1.2", 18008, corepb.HealthStatus_HEALTHY}},
xds.Locality{Region: "eu"})...),
xds.Locality{Region: "eu"})...,
),
},
cluster: "web", qtype: dns.TypeA, rcode: dns.RcodeSuccess, answer: 2,
loc: xds.Locality{Region: "eu"},
loc: xds.Locality{Region: "eu"}, // our location
},
}