add some test cases for image names

This commit is contained in:
Miles Crabill 2019-09-16 10:18:22 -07:00
parent c11a444f77
commit 328baced05
No known key found for this signature in database
GPG Key ID: 931A9CF57AEAC02D

View File

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