-
Notifications
You must be signed in to change notification settings - Fork 152
Conversation
@wimspaargaren thanks for this and looks fine! Could you please add the high level apis in |
…i for setting request and response body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost fine, but one thing left I would like to have is e2e test like this: https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/e2e/e2e_test.go#L96-L119
assert.True(t, strings.Contains(out, `initial request body: { "example": "body" }`)) | ||
assert.True(t, strings.Contains(out, "on http request body finished")) | ||
assert.False(t, strings.Contains(out, "failed to set request body")) | ||
assert.False(t, strings.Contains(out, "failed to get request body")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we assert string(r.Body) == "{ "another": "body" }"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I wasn't sure on how to verify that. What we're doing is replacing the request body
and the result is the response body
from the staticreply
filter. So the r.Body contains example body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, you are right. It seems fine as it is now 👍
@@ -19,6 +19,9 @@ test: | |||
test.e2e: | |||
docker run -it -w /tmp/proxy-wasm-go -v $(shell pwd):/tmp/proxy-wasm-go getenvoy/proxy-wasm-go-sdk-ci:istio-${ISTIO_VERSION} go test -v ./e2e | |||
|
|||
test.e2e.single: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, saves quite some time :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wimspaargaren for your contribution 🎖️ 💯
Resolve #45
We've tested the
set buffer bytes
function deployed in Istio and it seems to be working as expected.Filter built tiny go version:
Built using:
Istio version
Example usage:
Envoy filter description: