-
-
Notifications
You must be signed in to change notification settings - Fork 55
logs stdout, stderr and integration tests #257
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
Conversation
Job #257 is now in scope, role is |
This pull request #257 is assigned to @paulodamaso/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @amihaiemil/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be a monetary reward for this job |
Pull Request Test Coverage Report for Build 455
💛 - Coveralls |
Pull Request Test Coverage Report for Build 459
💛 - Coveralls |
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.
@amihaiemil Have some comments, please take a look
/** | ||
* Integration tests for {@link RtLogs}. | ||
* @author Mihai Andronache (amihaiemil@gmail.com) | ||
* @version $Id# |
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.
@amihaiemil $Id$
here
final String logs = container.logs().fetch(); | ||
MatcherAssert.assertThat( | ||
logs, | ||
Matchers.not(Matchers.isEmptyOrNullString()) |
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.
@amihaiemil I'd prefer to use non-static matchers, makes the code more elegant
); | ||
MatcherAssert.assertThat( | ||
logs.trim(), | ||
Matchers.startsWith("Hello from Docker!") |
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.
@amihaiemil Same as above
final String logs = IOUtils.toString(container.logs().follow()); | ||
MatcherAssert.assertThat( | ||
logs, | ||
Matchers.not(Matchers.isEmptyOrNullString()) |
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.
@amihaiemil Here too, no static matchers
); | ||
MatcherAssert.assertThat( | ||
logs.trim(), | ||
Matchers.startsWith("Hello from Docker!") |
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.
@amihaiemil Here again
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.
@amihaiemil Very good, thanks
@rultor merge |
@paulodamaso Thanks for your request. @amihaiemil Please confirm this. |
@rultor merge it |
@amihaiemil OK, I'll try to merge now. You can check the progress of the merge here |
@amihaiemil Done! FYI, the full log is here (took me 2min) |
Job was finished in 0 hours, bonus for fast delivery is possible (see §36) |
The job #257 is now out of scope |
Order was finished: +20 point(s) just awarded to @paulodamaso/z |
Payment to |
PR for #256. Apparently, it is mandatory to specify either
stdout
orstderr
when reading the logs. Left some puzzles.