mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 01:30:06 -04:00
add some test cases for image names
This commit is contained in:
parent
c11a444f77
commit
328baced05
1 changed files with 18 additions and 0 deletions
|
|
@ -156,6 +156,24 @@ func TestConfigPrepare(t *testing.T) {
|
|||
"foo bar",
|
||||
true,
|
||||
},
|
||||
{
|
||||
// underscore will be replaced
|
||||
"image_name",
|
||||
"foo_bar",
|
||||
false,
|
||||
},
|
||||
{
|
||||
// too long
|
||||
"image_name",
|
||||
"foobar123xyz_abc-456-one-two_three_five_nine_seventeen_eleventy-seven",
|
||||
true,
|
||||
},
|
||||
{
|
||||
// starts with non-alphabetic character
|
||||
"image_name",
|
||||
"1boohoo",
|
||||
true,
|
||||
},
|
||||
{
|
||||
"image_encryption_key",
|
||||
map[string]string{"kmsKeyName": "foo"},
|
||||
|
|
|
|||
Loading…
Reference in a new issue