Add Envoy integration test to show Header manip can interpolate Envoy variables
This commit is contained in:
parent
89947bef1f
commit
46400a033f
|
@ -25,6 +25,7 @@ config_entries {
|
|||
}
|
||||
set {
|
||||
x-existing-2 = "replaced-req"
|
||||
x-client-ip = "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"
|
||||
}
|
||||
remove = ["x-bad-req"]
|
||||
}
|
||||
|
|
|
@ -63,6 +63,9 @@ load helpers
|
|||
# Ingress should have replaced the second existing header
|
||||
echo "$output" | grep -E "^X-Existing-2: replaced-req"
|
||||
|
||||
# Ingress should have set the client ip from dynamic Envoy variable
|
||||
echo "$output" | grep -E "^X-Client-Ip: 127.0.0.1"
|
||||
|
||||
# Ingress should have removed the bad request header
|
||||
if echo "$output" | grep -E "^X-Bad-Req: true"; then
|
||||
echo "X-Bad-Req request header should have been stripped but was still present"
|
||||
|
|
Loading…
Reference in New Issue