Skip to content

Commit

Permalink
[e2e] Updating remote address e2e to use predicates
Browse files Browse the repository at this point in the history
Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Oct 24, 2024
1 parent 9ce542a commit 1f8f580
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions e2e/remote-address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ The Wasm configuration defines a set of rules for `*.example.com`.
"hostnames": [
"*.example.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != 50.0.0.1"
]
},
"actions": [
Expand All @@ -32,8 +28,9 @@ The Wasm configuration defines a set of rules for `*.example.com`.
"scope": "ratelimit-source",
"data": [
{
"selector": {
"selector": "source.remote_address"
"expression": {
"key": "source.remote_address",
"value": "source.remote_address"
}
}
]
Expand Down
13 changes: 5 additions & 8 deletions e2e/remote-address/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ static_resources:
"hostnames": [
"*.example.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != '50.0.0.1'"
]
},
"actions": [
Expand All @@ -71,8 +67,9 @@ static_resources:
"scope": "ratelimit-source",
"data": [
{
"selector": {
"selector": "source.remote_address"
"expression": {
"key": "source.remote_address",
"value": "source.remote_address"
}
}
]
Expand Down

0 comments on commit 1f8f580

Please sign in to comment.