mirror of
https://github.com/alibaba/higress.git
synced 2026-04-22 20:47:36 +08:00
feat: e2e test support http body check (#733)
This commit is contained in:
@@ -36,7 +36,7 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
name: wasmplugin-transform-response
|
||||
name: wasmplugin-transform-response-header-and-query
|
||||
namespace: higress-conformance-infra
|
||||
spec:
|
||||
ingressClassName: higress
|
||||
@@ -52,6 +52,46 @@ spec:
|
||||
port:
|
||||
number: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
name: wasmplugin-transform-request-body
|
||||
namespace: higress-conformance-infra
|
||||
spec:
|
||||
ingressClassName: higress
|
||||
rules:
|
||||
- host: "foo4.com"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: infra-backend-v1
|
||||
port:
|
||||
number: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
name: wasmplugin-transform-response-body
|
||||
namespace: higress-conformance-infra
|
||||
spec:
|
||||
ingressClassName: higress
|
||||
rules:
|
||||
- host: "foo5.com"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: infra-backend-echo-body-v1
|
||||
port:
|
||||
number: 8080
|
||||
---
|
||||
apiVersion: extensions.higress.io/v1alpha1
|
||||
kind: WasmPlugin
|
||||
metadata:
|
||||
@@ -118,9 +158,8 @@ spec:
|
||||
- key: k4
|
||||
value: RETAIN_FIRST
|
||||
|
||||
# response transformer
|
||||
- ingress:
|
||||
- higress-conformance-infra/wasmplugin-transform-response
|
||||
- higress-conformance-infra/wasmplugin-transform-response-header-and-query
|
||||
configDisable: false
|
||||
config:
|
||||
type: response
|
||||
@@ -151,5 +190,78 @@ spec:
|
||||
headers:
|
||||
- key: X-add-append
|
||||
value: X-map
|
||||
|
||||
- ingress:
|
||||
- higress-conformance-infra/wasmplugin-transform-request-body
|
||||
configDisable: false
|
||||
config:
|
||||
type: request
|
||||
rules:
|
||||
- operate: remove
|
||||
body:
|
||||
- key: X-removed
|
||||
- operate: rename
|
||||
body:
|
||||
- key: X-not-renamed
|
||||
value: X-renamed
|
||||
- operate: replace
|
||||
body:
|
||||
- key: X-replace
|
||||
value: replaced
|
||||
- operate: add
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: add
|
||||
- operate: append
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: append
|
||||
- operate: map
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: X-map
|
||||
- operate: dedupe
|
||||
body:
|
||||
- key: X-dedupe-first
|
||||
value: RETAIN_FIRST
|
||||
- key: X-dedupe-last
|
||||
value: RETAIN_LAST
|
||||
- key: X-dedupe-unique
|
||||
value: RETAIN_UNIQUE
|
||||
- ingress:
|
||||
- higress-conformance-infra/wasmplugin-transform-response-body
|
||||
configDisable: false
|
||||
config:
|
||||
type: response
|
||||
rules:
|
||||
- operate: remove
|
||||
body:
|
||||
- key: X-removed
|
||||
- operate: rename
|
||||
body:
|
||||
- key: X-not-renamed
|
||||
value: X-renamed
|
||||
- operate: replace
|
||||
body:
|
||||
- key: X-replace
|
||||
value: replaced
|
||||
- operate: add
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: add
|
||||
- operate: append
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: append
|
||||
- operate: map
|
||||
body:
|
||||
- key: X-add-append
|
||||
value: X-map
|
||||
- operate: dedupe
|
||||
body:
|
||||
- key: X-dedupe-first
|
||||
value: RETAIN_FIRST
|
||||
- key: X-dedupe-last
|
||||
value: RETAIN_LAST
|
||||
- key: X-dedupe-unique
|
||||
value: RETAIN_UNIQUE
|
||||
url: file:///opt/plugins/wasm-go/extensions/transformer/plugin.wasm
|
||||
Reference in New Issue
Block a user