-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix unit test runner and failing tests #67
Conversation
32274b6
to
e53d65e
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.
⭐️ Wow, good sleuthing, and thanks for cleaning this all up.
func marksParallelIfConfigured(t *testing.T) { | ||
t.Parallel() | ||
func checkIfIntegrationTestsAreEnabled(t *testing.T) { | ||
integrationTestsEnvironmentVariable := "CONDUIT_INTEGRATION_TESTS_ENABLED" |
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.
TIOLI -- you could move this up with the rest of the consts at the top of this file.
web/srv/handlers_test.go
Outdated
actualBody := recorder.Body.String() | ||
|
||
if !strings.Contains(actualBody, expectedVersionDiv) { | ||
t.Fatalf("Expected string [%s] to be presentn in [%s]", expectedVersionDiv, actualBody) |
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.
Typo here: presentn
=> present
2df9838
to
c2f0e61
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.
⭐️ Great, thanks for updating. I think this just needs a master merge, and it should be good to go.
There are many different types of things that implement `fmt::Display` in the metrics library: lists of key-value labels, individial label keys or values, groups of metrics output, etc. While modifying metrics code, it can be very easy to use something that's not a label in the context of a label.
Following linkerd#67 and linkerd#68, the `labels::Direction` type can be replaced with an `impl FmtLabels for ctx::Proxy`.
Following linkerd#67 and linkerd#68, the `labels::TlsStatus` type can be removed in favor of extending underlying `ctx::transport::TlsStatus` type to implement `FmtLabels`.
The canonical test command used in our
.travis.yml
passes:But I realised that even if I make a test fail on purpose, it always passes. So I've tried running without the
--run "^(integration_test)"
bit, and now this hangs forever:So in commit e043adf I've changed our travis file to the command above. In commit a4db27c I;'ve also made the integration tests only
CONDUIT_INTEGRATION_TESTS_ENABLED
, removing the need for the flag ongo test
.Now it still hangs, but before hanging it shows us that another test was broken and has never been reported as such:
So on commit 1c5adc6 I've fixed the bug that was causing the test to hang, and now we have a broken build, as it should the case since forever. Running locally you get this:
Subsequent commits fix tests that had been failing for a while and we didn't know about because of the problems stated above. After that we're back to a good state: