Skip to content
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

bugfix: make the PullImage test util work #1386

Merged
merged 1 commit into from
May 23, 2018
Merged

bugfix: make the PullImage test util work #1386

merged 1 commit into from
May 23, 2018

Conversation

fuweid
Copy link
Contributor

@fuweid fuweid commented May 23, 2018

Ⅰ. Describe what this PR did

The post method of pullImage will hijack the connection so that the HTTP header always contains 200. It means that we cannot just check the HTTP status. We should read all the data bytes from server.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how you did it

Read the bytes from server and check the error in the jsonstream.

Ⅳ. Describe how to verify it

Remove the command.PouchRun("pull", busyboxImage) in the beginning of test so that we can make sure the PullImage works well or not.

Ⅴ. Special notes for reviews

It is very important to make CI happy

The post method of pullImage will hijack the connection so that the HTTP
header always contains 200. It means that we cannot just check the HTTP
status. We should read all the data bytes from server.

Signed-off-by: Wei Fu <fhfuwei@163.com>
@pouchrobot pouchrobot added areas/test kind/bug This is bug report for project size/M labels May 23, 2018
@fuweid fuweid requested a review from Letty5411 May 23, 2018 07:36
@Letty5411
Copy link
Contributor

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 23, 2018
@codecov-io
Copy link

Codecov Report

Merging #1386 into master will decrease coverage by 3.53%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1386      +/-   ##
==========================================
- Coverage   38.61%   35.07%   -3.54%     
==========================================
  Files         248      254       +6     
  Lines       16512    17795    +1283     
==========================================
- Hits         6376     6242     -134     
- Misses       9318    10737    +1419     
+ Partials      818      816       -2
Impacted Files Coverage Δ
cri/v1alpha1/cri_utils.go 0% <0%> (-29.32%) ⬇️
cri/v1alpha2/cri_utils.go 0% <0%> (-28.42%) ⬇️
apis/server/utils.go 61.11% <0%> (-5.56%) ⬇️
ctrd/watch.go 69.81% <0%> (-3.78%) ⬇️
daemon/mgr/network.go 68.3% <0%> (-0.5%) ⬇️
daemon/mgr/container.go 49.35% <0%> (-0.09%) ⬇️
cri/src/cri_types.go 0% <0%> (ø)
cri/src/cri_network.go 0% <0%> (ø)
cri/src/cri.go 0% <0%> (ø)
cri/src/cri_stream.go 0% <0%> (ø)
... and 3 more

@Letty5411 Letty5411 merged commit 15aec73 into AliyunContainerService:master May 23, 2018
@fuweid fuweid deleted the bugfix_make_ci_happy branch August 3, 2018 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/test kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants