-
Notifications
You must be signed in to change notification settings - Fork 801
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
Make test should pass locally #4915
Conversation
testflags/testflags.go
Outdated
} | ||
|
||
// TODO: Better instructions: | ||
// 1) How to start external dependencies - maybe link to docs so we can change it easily? |
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.
probably going to be something like "start cassandra (very likely docker run cassandra:version
), and install the schema".
but that can come later. and there's a million acceptable ways to do it, so deciding what's best may take a few rounds.
Pull Request Test Coverage Report for Build 0182fc0c-7ece-47ca-a908-0e9d0e296305
💛 - Coveralls |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
package testflags |
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 like it better than any other name I've thought of 👍 Very clear what it's looking for / related to.
tools/cli/render_test.go
Outdated
TimeField: time.Date(2000, 11, 12, 13, 14, 15, 16, time.Local), | ||
TimeField: time.Date(2000, 11, 12, 13, 14, 15, 16, time.UTC), |
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.
heh. yeah, or some other fixed time zone if we want to assert that it localizes.
UTC is fine / consistent tho.
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.
A bit of a shame that some are pushed into a base-test-helper-like-thing and some are not... but I don't think it's necessary to be consistent there. some packages are more clearly "depends on external stuff" than others.
dependencies. - Plumb the RequiresX() functions into tests that depend on them. "Make test" now passes locally for me!
Co-authored-by: Steven L <stevenl@uber.com>
…ferent tests running with diff persistence.
I made the Makefile / buildkite changes and have ensured no tests are being skipped in buildkite, by downloading before and after test logs and comparing them. No tests are skipped in buildkite, and the exact same set of tests were run before and after my changes. |
OPT_OUT_TEST=./bench/% ./canary/% | ||
OPT_OUT_TEST= |
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.
bleh. I didn't notice this one before D:
Add test flags (controlled by environment variables) that are used to skip tests that have external dependencies. Tests call RequiresX() functions to mark that they depend on X to run. When tests cannot run because they require a dependency, they will be skipped and print out a message describing how to run that test (after starting your dependency.) In order to run tests marked with a dependency, you use the following environment variables: CASSANDRA, MYSQL, MONGODB, POSTGRES. So for example, to run tests that depend on Cassandra: CASSANDRA=1 make test
Add test flags (controlled by environment variables) that are used to skip tests that have external dependencies. Tests call RequiresX() functions to mark that they depend on X to run. When tests cannot run because they require a dependency, they will be skipped and print out a message describing how to run that test (after starting your dependency.) In order to run tests marked with a dependency, you use the following environment variables: CASSANDRA, MYSQL, MONGODB, POSTGRES. So for example, to run tests that depend on Cassandra: CASSANDRA=1 make test
-- Plumb the RequiresX() functions into tests that depend on them.
Make test now runs failure-free locally.