Skip to content

Commit 501c225

Browse files
committed
Add missing test
Signed-off-by: David Gageot <[email protected]>
1 parent aea09f0 commit 501c225

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/skaffold/yamltags/tags_test.go

+10
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ func TestValidateStructInvalid(t *testing.T) {
167167
ValidateStruct(invalidTags)
168168
}
169169

170+
func TestValidateStructInvalidSyntax(t *testing.T) {
171+
invalidTags := struct {
172+
A string `yamltags:"oneOf=set1=set2"`
173+
}{}
174+
175+
err := ValidateStruct(invalidTags)
176+
177+
testutil.CheckError(t, true, err)
178+
}
179+
170180
func TestIsZeroValue(t *testing.T) {
171181
testutil.CheckDeepEqual(t, true, isZeroValue(reflect.ValueOf(0)))
172182
testutil.CheckDeepEqual(t, true, isZeroValue(reflect.ValueOf(nil)))

0 commit comments

Comments
 (0)