4matting
This commit is contained in:
@ -8,12 +8,12 @@ import (
|
||||
|
||||
func TestGetImageNameAndTag(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
imageName string
|
||||
expectedName string
|
||||
expectedTag string
|
||||
expectError bool
|
||||
description string
|
||||
name string
|
||||
imageName string
|
||||
expectedName string
|
||||
expectedTag string
|
||||
expectError bool
|
||||
description string
|
||||
}{
|
||||
{
|
||||
name: "standard image with tag",
|
||||
@ -67,13 +67,12 @@ func TestGetImageNameAndTag(t *testing.T) {
|
||||
expectError: true,
|
||||
description: "should error on empty image name",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
name, tag, err := GetImageNameAndTag(tt.imageName)
|
||||
|
||||
|
||||
if tt.expectError {
|
||||
assert.Error(t, err)
|
||||
assert.Empty(t, name)
|
||||
@ -85,4 +84,4 @@ func TestGetImageNameAndTag(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user