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

bug: fix rename a container with invalid name bug #2945

Merged
merged 2 commits into from
Jul 11, 2019

Conversation

lang710
Copy link
Contributor

@lang710 lang710 commented Jul 10, 2019

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

Ⅰ. Describe what this PR did

fix rename a container with invalid name bug

Ⅱ. Does this pull request fix one issue?

NONE

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

Added.

Ⅳ. Describe how to verify it

root@compatibility:~ # pouch run -d --name name1 busybox top
root@compatibility:~ # pouch rename name1 name:new
Error: {"message":"Invalid container name (name:new), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed"}

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Jul 10, 2019

Codecov Report

Merging #2945 into master will decrease coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2945      +/-   ##
==========================================
- Coverage   68.17%   68.05%   -0.13%     
==========================================
  Files         291      291              
  Lines       18345    18347       +2     
==========================================
- Hits        12507    12486      -21     
- Misses       4380     4395      +15     
- Partials     1458     1466       +8
Flag Coverage Δ
#criv1alpha2_test 34.77% <0%> (-0.03%) ⬇️
#integration_test_0 36.1% <0%> (-0.05%) ⬇️
#integration_test_1 35.49% <0%> (-0.01%) ⬇️
#integration_test_2 36.1% <100%> (ø) ⬆️
#integration_test_3 35.59% <0%> (+0.04%) ⬆️
#node_e2e_test 34.16% <0%> (-0.06%) ⬇️
#unittest 27.95% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
daemon/mgr/container.go 59.89% <100%> (-0.54%) ⬇️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
cri/ocicni/netns.go 58.1% <0%> (-2.71%) ⬇️
ctrd/container.go 51.62% <0%> (-1.92%) ⬇️
ctrd/supervisord/daemon.go 49.32% <0%> (-1.36%) ⬇️
cri/v1alpha2/cri.go 63.78% <0%> (-0.26%) ⬇️
apis/server/container_bridge.go 90.55% <0%> (+0.55%) ⬆️

@pouchrobot pouchrobot added kind/bug This is bug report for project size/M labels Jul 10, 2019
Signed-off-by: Lang Chi <21860405@zju.edu.cn>
test/cli_rename_test.go Outdated Show resolved Hide resolved
Signed-off-by: Lang Chi <21860405@zju.edu.cn>
@ZYecho
Copy link
Contributor

ZYecho commented Jul 11, 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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants