Merge pull request #2560 from yutachaos/feature/added_numberonlytag_test_editset_image

Add test case when image tag is a number
This commit is contained in:
Kubernetes Prow Robot
2020-06-05 13:57:46 -07:00
committed by GitHub

View File

@@ -38,6 +38,30 @@ func TestSetImage(t *testing.T) {
" newTag: my-tag",
}},
},
{
given: given{
args: []string{"image1=my-image1:1234"},
},
expected: expected{
fileOutput: []string{
"images:",
"- name: image1",
" newName: my-image1",
" newTag: \"1234\"",
}},
},
{
given: given{
args: []string{"image1=my-image1:3.2e2"},
},
expected: expected{
fileOutput: []string{
"images:",
"- name: image1",
" newName: my-image1",
" newTag: \"3.2e2\"",
}},
},
{
given: given{
args: []string{"image1=my-image1@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3"},