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

fix: report error when creating a new network with an existent name #663

Merged
merged 1 commit into from
Feb 1, 2018
Merged

Conversation

ZouRui89
Copy link
Contributor

Signed-off-by: Zou Rui [email protected]

1.Describe what this PR did
Report error message when creating a new network with an existent name.
2.Does this pull request fix one issue?

fixes #662
3.Describe how you did it
Before creating a new network, check if the network name exists.
4.Describe how to verify it
$ pouch network create net1
net1: b8d22aaa9db862f9f393eca9f4bdb45b12539b6352d417456bf4fd7774f3e2de
$ pouch network create net1
Error: {"message":"network net1 already exists"}

5.Special notes for reviews

@pouchrobot pouchrobot added areas/network kind/bug This is bug report for project size/XS labels Jan 30, 2018
@allencloud
Copy link
Collaborator

allencloud commented Jan 30, 2018

Please add an integration test case. Thanks a lot. @ZouRui89
And check if it returns a status code of 409.

@codecov-io
Copy link

codecov-io commented Jan 30, 2018

Codecov Report

Merging #663 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #663   +/-   ##
=======================================
  Coverage   10.16%   10.16%           
=======================================
  Files          71       71           
  Lines        3425     3425           
=======================================
  Hits          348      348           
  Misses       3038     3038           
  Partials       39       39

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62aada5...f2ae804. Read the comment docs.

@pouchrobot pouchrobot added size/S and removed size/XS labels Jan 30, 2018
@ZouRui89
Copy link
Contributor Author

It still returns 500. Please take a look.@allencloud

@allencloud
Copy link
Collaborator

LGTM, thanks a lot for your work. @ZouRui89

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Feb 1, 2018
@allencloud allencloud merged commit 8cd781e into AliyunContainerService:master Feb 1, 2018
@ZouRui89 ZouRui89 deleted the net_create branch February 1, 2018 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/network kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]no error is reported when creating a new network with an existent name
4 participants