Skip to content

Commit

Permalink
Add missing test
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot committed May 29, 2019
1 parent aea09f0 commit 501c225
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/skaffold/yamltags/tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ func TestValidateStructInvalid(t *testing.T) {
ValidateStruct(invalidTags)
}

func TestValidateStructInvalidSyntax(t *testing.T) {
invalidTags := struct {
A string `yamltags:"oneOf=set1=set2"`
}{}

err := ValidateStruct(invalidTags)

testutil.CheckError(t, true, err)
}

func TestIsZeroValue(t *testing.T) {
testutil.CheckDeepEqual(t, true, isZeroValue(reflect.ValueOf(0)))
testutil.CheckDeepEqual(t, true, isZeroValue(reflect.ValueOf(nil)))
Expand Down

0 comments on commit 501c225

Please sign in to comment.