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: create container with invalid name #2928

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

lang710
Copy link
Contributor

@lang710 lang710 commented Jun 24, 2019

Signed-off-by: Lang Chi 21860405@zju.edu.cn

Ⅰ. Describe what this PR did

bugfix: create contaienr with invalid name

Ⅱ. Does this pull request fix one issue?

#2918

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Added.

Ⅳ. Describe how to verify it

root@compatibility:~/go/src/github.com/alibaba/pouch# pouch create --name new:invalid busybox
Error: failed to create container: {"message":"Invalid container name (new:invalid), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed"}

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

Merging #2928 into master will decrease coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2928      +/-   ##
==========================================
- Coverage   68.18%   68.07%   -0.12%     
==========================================
  Files         291      291              
  Lines       18339    18341       +2     
==========================================
- Hits        12505    12486      -19     
- Misses       4376     4390      +14     
- Partials     1458     1465       +7
Flag Coverage Δ
#criv1alpha2_test 34.8% <33.33%> (-0.01%) ⬇️
#integration_test_0 36.13% <33.33%> (+0.11%) ⬆️
#integration_test_1 35.49% <33.33%> (ø) ⬆️
#integration_test_2 36.34% <33.33%> (+0.36%) ⬆️
#integration_test_3 35.51% <100%> (-0.05%) ⬇️
#node_e2e_test 34.17% <33.33%> (-0.05%) ⬇️
#unittest 27.96% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
daemon/config/config.go 69.51% <ø> (ø) ⬆️
daemon/mgr/container.go 59.81% <100%> (-0.34%) ⬇️
cri/ocicni/netns.go 58.1% <0%> (-2.71%) ⬇️
ctrd/container.go 52% <0%> (-2.3%) ⬇️
cri/ocicni/cni_manager.go 61.32% <0%> (-0.95%) ⬇️
cri/v1alpha2/cri.go 63.53% <0%> (-0.76%) ⬇️
daemon/mgr/container_utils.go 77.77% <0%> (+1.01%) ⬆️
pkg/meta/store.go 68.99% <0%> (+1.55%) ⬆️

@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels Jun 24, 2019
@lang710 lang710 changed the title bugfix: create contaienr with invalid name bugfix: create container with invalid name Jun 24, 2019
@ZYecho
Copy link
Contributor

ZYecho commented Jun 25, 2019

LGTM

Signed-off-by: Lang Chi <21860405@zju.edu.cn>
@ZYecho
Copy link
Contributor

ZYecho commented Jul 10, 2019

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants