fix: golang server replay edge case, response body is empty.#35
fix: golang server replay edge case, response body is empty.#35wanlin31 merged 2 commits intogoogle:mainfrom
Conversation
|
|
||
| After the previous steps, the directory structure looks like this. The goal is to replace the test-server binary highlighted below, the graph below is a tree view of your directory structure from `test-server/sdks/typescript/samples`. | ||
|
|
||
| ```diff |
There was a problem hiding this comment.
it is nice to add a detailed structure diagram to help understand the structure, my only concern is we may update the structure in the future and may forget to update this structure.
There was a problem hiding this comment.
The reason I want to put it there is, it is really hard to describe which binary to replace, I want to demonstrate that it is the one inside the samples folder would make it effective.
I myself accidentally replaced the ones that in the sdks/typscript/bin/, didn't work at all. I think the better way is to have the CI run this test and we can refer to CI's workflow for manual test.
I will create a internal bug for add the CI and update this documentation.
For now, it serve as a starting point for team members to try the local build. :) Hope that is okay.
| } | ||
|
|
||
| // When the response body is empty we return directly with the headers. | ||
| if len(resp.BodySegments) == 0 { |
There was a problem hiding this comment.
wdyt to write the headers? and skip write json bytes
There was a problem hiding this comment.
In the follow up CL, sorry I missed your comment :)
Minor change to allow the response body to be empty, such as file.create, *.list and *Delete method where the response body is empty.
Update the typescript samples to assert on headers since the response body is empty in samples.
Added a developer guild to for manual e2e testing steps.
Follow up: can add a CI for this e2e test later.