Add test case when image tag is a number

This commit is contained in:
yutachaos
2020-06-02 21:30:37 +09:00
parent 952a2ebbf4
commit 88ebe1c73e

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"},