Fix broken tests; make sure we don't mask travis script exit codes#2274
Fix broken tests; make sure we don't mask travis script exit codes#2274dmcgowan merged 2 commits intocontainerd:masterfrom
Conversation
Signed-off-by: Phil Estes <[email protected]>
exit is hiding errors|
This should actually be reviewed and merged now if tests pass. |
These tests are using their name as ID, but subtests add a forward slash connected to the parent test, and slash (/) is an invalid character for container IDs. Signed-off-by: Phil Estes <[email protected]>
|
This looks better: |
| test $exit_code -ne 0 && cat /tmp/containerd-cri.log ; | ||
| test $? -ne 0 && cat /tmp/containerd-cri.log ; | ||
| sudo pkill containerd ; | ||
| exit $exit_code ; |
There was a problem hiding this comment.
What will be the exit code now? What's going on in Travis? 😕
There was a problem hiding this comment.
Turns out travis is already collecting exit codes from each command and will exit with failure if any of the commands within script: have a non-zero return code. Somehow, calling exit circumvents the rest of travis processing--you can see from older builds that travis never even got to output its usual "closing" success or fail when the exit $exit_code ; call exists in travis.yml! basically the collection of this exit code was unnecessary as travis is already handling that.
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah! makes sense now, thanks :)
Codecov Report
@@ Coverage Diff @@
## master #2274 +/- ##
==========================================
+ Coverage 41.06% 45.39% +4.32%
==========================================
Files 66 83 +17
Lines 7775 9173 +1398
==========================================
+ Hits 3193 4164 +971
- Misses 4077 4332 +255
- Partials 505 677 +172
Continue to review full report at Codecov.
|
Fix the tests that were using an invalid container ID and fix travis script to not mask error exit return codes.
Signed-off-by: Phil Estes [email protected]