-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests(static-server): allow hook to modify response body #9872
Conversation
I'm going to dismiss my review request @brendankenny this is all you since it's a large change to be unable to see the context for :) |
|
This is just meant to change the port numbers on URLs, so the hook could be less generic and be specifically We can follow up on this after I write / we discuss a doc re: the whole integration testing story. |
The first post was updated with the relevant doc (@patrickhulce, nothing has changed since you last reviewed the doc) I don't think knowing the usage internally is necessary for reviewing this change. The idea is just that the ports must be configurable (the internal test is assigned 2 free ports, and they are random). |
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.
I think we'll need a story for how to exercise the other integration parts of this that are smokerider-specific.
The generic port part LGTM, but I don't feel very confident in my ability to review the other bits.
Also I've since learned it's a Goog holiday so no need to reply @connorjclark, sorry :) |
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.
LGTM
/** | ||
* @param {string} url | ||
*/ | ||
function get(url) { |
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.
fwiw, we already have isomorphic-fetch
in our devDeps that should make this much easier :)
const fetch = require('isomorphic-fetch')
const get = url => fetch(url).then(r => r.text())
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.
so fetch
This hook is needed to modify the URLs in the fixtures for running smoke tests on Lightrider in CI.
Googlers: see cl/275909869 / doc