-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: run functional test with cached rpc response in ci #64
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: bestmike007 <i@bestmike007.com>
7b7c814
to
ce49122
Compare
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 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) |
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.
do not ignore error
http.Error(w, err.Error(), http.StatusInternalServerError) | ||
return | ||
} | ||
_ = os.WriteFile(cachePath, result, 0o644) |
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.
do not ignore error
@@ -0,0 +1,137 @@ | |||
package main |
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.
Can you update README and document how to re-generate the fixtures?
return | ||
} | ||
_, _ = w.Write(resultBody) | ||
} |
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.
return | ||
} | ||
cachePath := path.Join( | ||
baseFolder, "seed", chain, |
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.
baseFolder, "seed", chain, | |
baseFolder, "fixtures", chain, |
@bestmike007 FYI it seems there is some conflicts |
What changed? Why?
rpc_replayer
tool for recording rpc responsesHow did you test the change?
GitHub Actions