clusterWithLBConfiguration returns a cluster resource with the proto message passed Marshaled to an any and specified through the load_balancing_policy field.
(t *testing.T, clusterName, edsServiceName string, secLevel e2e.SecurityLevel, m proto.Message)
| 73 | // passed Marshaled to an any and specified through the load_balancing_policy |
| 74 | // field. |
| 75 | func clusterWithLBConfiguration(t *testing.T, clusterName, edsServiceName string, secLevel e2e.SecurityLevel, m proto.Message) *v3clusterpb.Cluster { |
| 76 | cluster := e2e.DefaultCluster(clusterName, edsServiceName, secLevel) |
| 77 | cluster.LoadBalancingPolicy = &v3clusterpb.LoadBalancingPolicy{ |
| 78 | Policies: []*v3clusterpb.LoadBalancingPolicy_Policy{ |
| 79 | { |
| 80 | TypedExtensionConfig: &v3corepb.TypedExtensionConfig{ |
| 81 | TypedConfig: testutils.MarshalAny(t, m), |
| 82 | }, |
| 83 | }, |
| 84 | }, |
| 85 | } |
| 86 | return cluster |
| 87 | } |
| 88 | |
| 89 | // TestWRRLocality tests RPC distribution across a scenario with 5 backends, |
| 90 | // with 2 backends in a locality with weight 1, and 3 backends in a second |
no test coverage detected