upstream endpoints load balancer weights (#1830)

This commit is contained in:
wasaga 2021-01-28 09:11:14 -05:00 committed by GitHub
parent 3567183ce5
commit 67f6030e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1190 additions and 778 deletions

View file

@ -157,7 +157,7 @@ func TestAuthorize_okResponse(t *testing.T) {
SignedJWT: "valid-signed-jwt",
MatchingPolicy: &config.Policy{
EnableGoogleCloudServerlessAuthentication: true,
Destinations: mustParseURLs("https://example.com"),
To: mustParseWeightedURLs(t, "https://example.com"),
},
},
&envoy_service_auth_v2.CheckResponse{
@ -288,3 +288,9 @@ func TestAuthorize_deniedResponse(t *testing.T) {
})
}
}
func mustParseWeightedURLs(t *testing.T, urls ...string) []config.WeightedURL {
wu, err := config.ParseWeightedUrls(urls...)
require.NoError(t, err)
return wu
}