You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test framework does not expose pseudo-headers like :path for the provided wasm module to manipulate.
The headers passed to the wasm module by the test fixture are exactly what the test author provides to TestHttpContext::SendRequestHeaders, so the easy fix is to pass the :path pseudo-header in the call to SendRequestHeaders.
The longer-term feature request here is for SendRequestHeaders to take in the fields represented as pseudo-headers and supply them to the wasm module via the correct pseudo-headers.
As a whole the testing framework right now is designed to be as transparent as possible to let the test author control the environment passed to the wasm module. Lightweight test frameworks are useful for authors understanding the environment their code is running in and removes friction while writing tests, but I can also understand the desire for the test framework to provide a more comprehensive way of testing against the behavior of the GCP service. We will discuss this tradeoff at our next meeting.
The text was updated successfully, but these errors were encountered:
leonm1
changed the title
Test framework does not expose Envoy-provided pseudo headers by
Test framework does not expose Envoy-provided pseudo headers by default
May 30, 2023
Is this issue still relevant? I added an HTTP1 parser to the test framework in #91, which I think addresses the concern of converting from HTTP1 headers to HTTP2 headers.
This is a feature request from #1:
The test framework does not expose pseudo-headers like
:path
for the provided wasm module to manipulate.The headers passed to the wasm module by the test fixture are exactly what the test author provides to
TestHttpContext::SendRequestHeaders
, so the easy fix is to pass the:path
pseudo-header in the call toSendRequestHeaders
.The longer-term feature request here is for
SendRequestHeaders
to take in the fields represented as pseudo-headers and supply them to the wasm module via the correct pseudo-headers.As a whole the testing framework right now is designed to be as transparent as possible to let the test author control the environment passed to the wasm module. Lightweight test frameworks are useful for authors understanding the environment their code is running in and removes friction while writing tests, but I can also understand the desire for the test framework to provide a more comprehensive way of testing against the behavior of the GCP service. We will discuss this tradeoff at our next meeting.
The text was updated successfully, but these errors were encountered: