-
Notifications
You must be signed in to change notification settings - Fork 950
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
test: add missing integration test for PouchContainer #2612
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2612 +/- ##
==========================================
- Coverage 69.45% 68.71% -0.75%
==========================================
Files 277 277
Lines 17429 17437 +8
==========================================
- Hits 12106 11982 -124
- Misses 3999 4103 +104
- Partials 1324 1352 +28
|
@allencloud it's failed to run make check, the details as follows.
|
9c2621d
to
2c48bc7
Compare
a1ca710
to
6f38812
Compare
@allencloud there are 4 cases are failure in CI. ----------------------------------------------------------------------
FAIL: /home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_inspect_test.go:28: APIContainerExecInspectSuite.TestContainerExecInspectOk
/home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_inspect_test.go:80:
c.Assert(execInspect02.Running, check.Equals, true)
... obtained bool = false
... expected bool = true
----------------------------------------------------------------------
FAIL: /home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:195: APIContainerExecStartSuite.TestContainerExecStartDup
/home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:213:
CheckRespStatus(c, resp, 500)
/home/travis/gopath/src/github.com/alibaba/pouch/test/util_api.go:27:
c.Assert(resp.StatusCode, check.Equals, status, check.Commentf("Response Body: %v", string(body)))
... obtained int = 200
... expected int = 500
... Response Body: �(failed to create containerIO: conflict
----------------------------------------------------------------------
FAIL: /home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:173: APIContainerExecStartSuite.TestContainerExecStartPaused
/home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:186:
CheckRespStatus(c, resp, 200)
/home/travis/gopath/src/github.com/alibaba/pouch/test/util_api.go:27:
c.Assert(resp.StatusCode, check.Equals, status, check.Commentf("Response Body: %v", string(body)))
... obtained int = 204
... expected int = 200
... Response Body:
----------------------------------------------------------------------
FAIL: /home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:156: APIContainerExecStartSuite.TestContainerExecStartStopped
/home/travis/gopath/src/github.com/alibaba/pouch/test/api_container_exec_start_test.go:162:
execid := CreateExecCmdOk(c, cname, "echo", "test")
/home/travis/gopath/src/github.com/alibaba/pouch/test/util_api.go:27:
c.Assert(resp.StatusCode, check.Equals, status, check.Commentf("Response Body: %v", string(body)))
... obtained int = 500
... expected int = 201
... Response Body: {"message":"container af955a13ea8d00c9137c73e391b9d60413f00609e9324e6e76b0810542f190b8 is not running"} |
be7f180
to
cb52843
Compare
704777c
to
bed8fe9
Compare
Unfortunately, the image pulling part fails with:
I think there is much possibility that this is a flaky case due to network issue. While I think we should try to add some retry logistics in it to reduce the failure possibility of outer issues. |
|
||
c.Assert(execInspect01.Running, check.Equals, false) | ||
c.Assert(execInspect01.ExitCode, check.Equals, int64(0)) | ||
execid := CreateExecCmdOk(c, cname, "sleep", "9") |
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 am not sure that the sleep
is good call. I think we can hold connection for cat
command. The cat
process will be running until we close the connection. It can help to make the case stable.
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 am wondering if we could keep it there currently. Still keep the original test case, and the test case could be done in the following releases.
bbe8f5f
to
9e0bf04
Compare
Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
ping @allencloud |
closing it because it is not active right now. please feel free to reopen it. |
Signed-off-by: Allen Sun allensun.shl@alibaba-inc.com
Ⅰ. Describe what this PR did
This PR fixed the following issues:
In
内部PouchContainer NightlyBuild 测试看板 20181224-041536
:We skipped lots of test cases.
This PR tries to add some. And could you help to try to make the rest ones to move on(Whether to continue developing or skipping).
Ⅱ. Does this pull request fix one issue?
no
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
added
Ⅳ. Describe how to verify it
none
Ⅴ. Special notes for reviews
@sunyuan3 @chuanchang