feat: run functional test with cached rpc response in ci#64
Draft
bestmike007 wants to merge 1 commit intocoinbase:masterfrom
Draft
feat: run functional test with cached rpc response in ci#64bestmike007 wants to merge 1 commit intocoinbase:masterfrom
bestmike007 wants to merge 1 commit intocoinbase:masterfrom
Conversation
Signed-off-by: bestmike007 <i@bestmike007.com>
7b7c814 to
ce49122
Compare
jiezhang
reviewed
Nov 9, 2023
Contributor
jiezhang
left a comment
There was a problem hiding this comment.
Thanks for the contribution! We heavily rely on these functional tests at Coinbase to catch regressions, but we didn't have a good way to run them in this open source repo. Nice work!
| fmt.Printf("%+v, cache path: %v\n", jsonBody, cachePath) | ||
| cache, err := os.ReadFile(cachePath) | ||
| if err == nil { | ||
| _, _ = w.Write(cache) |
| http.Error(w, err.Error(), http.StatusInternalServerError) | ||
| return | ||
| } | ||
| _ = os.WriteFile(cachePath, result, 0o644) |
| @@ -0,0 +1,137 @@ | |||
| package main | |||
Contributor
There was a problem hiding this comment.
Can you update README and document how to re-generate the fixtures?
| return | ||
| } | ||
| _, _ = w.Write(resultBody) | ||
| } |
Contributor
| return | ||
| } | ||
| cachePath := path.Join( | ||
| baseFolder, "seed", chain, |
Contributor
There was a problem hiding this comment.
Suggested change
| baseFolder, "seed", chain, | |
| baseFolder, "fixtures", chain, |
Contributor
|
@bestmike007 FYI it seems there is some conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed? Why?
rpc_replayertool for recording rpc responsesHow did you test the change?
GitHub Actions