Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement onRequestMetadata/onResponseMetadata #249

Closed
wants to merge 4 commits into from

Conversation

zirain
Copy link

@zirain zirain commented Feb 17, 2022

Hi @mathetake , I'm new to proxy-wasm-go-sdk and trying to fixed #91 .

@mathetake
Copy link
Member

thanks! Would it be possible to add e2e tests?

proxywasm/types/context.go Outdated Show resolved Hide resolved
proxywasm/types/context.go Outdated Show resolved Hide resolved
@zirain
Copy link
Author

zirain commented Feb 17, 2022

thanks! Would it be possible to add e2e tests?

I think it's ok, but need a little bit time.

I'm trying to figure out why always fail on my env when run e2e test

go test -v ./e2e -count=1
=== RUN   Test_dispatch_call_on_tick
    main_test.go:63: 
                Error Trace:    main_test.go:63
                                                        e2e_test.go:30
                Error:          Condition never satisfied
                Test:           Test_dispatch_call_on_tick
                Messages:       Envoy has not started
--- FAIL: Test_dispatch_call_on_tick (5.00s)
root@istiodev /m/d/g/s/i/proxy-wasm-go-sdk (main) [SIGINT]# which envoy
/usr/local/bin/envoy

@mathetake
Copy link
Member

maybe you have to do make build.examples before running e2e as it uses example binaries. https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/Makefile#L9-L10

@zirain
Copy link
Author

zirain commented Feb 17, 2022

maybe you have to do make build.examples before running e2e as it uses example binaries. https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/Makefile#L9-L10

that works fine, maybe we need update doc or makefile?

@mathetake
Copy link
Member

I would appreciate if you could fix makefile and add file dependency on make tset.e2e

@mathetake
Copy link
Member

what I want you to add is not only an example but the actual test running on envoy: https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/e2e/e2e_test.go

@zirain
Copy link
Author

zirain commented Feb 17, 2022

what I want you to add is not only an example but the actual test running on envoy: https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/e2e/e2e_test.go

yes, but I got no idea about how to simulate a http request will trigger OnHttpRequestMetadata, any suggestions?

examples/http_metadata/main.go Outdated Show resolved Hide resolved
examples/http_metadata/main.go Outdated Show resolved Hide resolved
@mathetake
Copy link
Member

maybe speaking HTTP text directly via tcp connection?

@zirain
Copy link
Author

zirain commented Feb 17, 2022

maybe speaking HTTP text directly via tcp connection?

let me try with that.

@zirain
Copy link
Author

zirain commented Feb 17, 2022

failed to setup a demo, @mathetake can you share how to do that when you're free, or you can take over the whole PR.

@zirain zirain closed this Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for on_{request,response}_meta_data.
2 participants