Skip to content

Commit

Permalink
Update azureimage_validation_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed May 15, 2020
1 parent 835d149 commit b9b11aa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/v1alpha3/azureimage_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/util/validation/field"
)

func TestImageRequired(t *testing.T) {
func TestImageOptional(t *testing.T) {
g := NewWithT(t)

type test struct {
Expand All @@ -34,10 +34,7 @@ func TestImageRequired(t *testing.T) {
extension := test{}

errs := ValidateImage(extension.Image, field.NewPath("image"))
g.Expect(errs).To(HaveLen(1))
g.Expect(errs[0].Type).To(Equal(field.ErrorTypeRequired))
g.Expect(errs[0].Field).To(Equal("image"))
g.Expect(errs[0].Detail).NotTo(BeEmpty())
g.Expect(errs).To(HaveLen(0))
}

func TestImageTooManyDetails(t *testing.T) {
Expand Down

0 comments on commit b9b11aa

Please sign in to comment.