Skip to content

Commit b9b11aa

Browse files
author
Cecile Robert-Michon
committed
Update azureimage_validation_test.go
1 parent 835d149 commit b9b11aa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

api/v1alpha3/azureimage_validation_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"k8s.io/apimachinery/pkg/util/validation/field"
2525
)
2626

27-
func TestImageRequired(t *testing.T) {
27+
func TestImageOptional(t *testing.T) {
2828
g := NewWithT(t)
2929

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

3636
errs := ValidateImage(extension.Image, field.NewPath("image"))
37-
g.Expect(errs).To(HaveLen(1))
38-
g.Expect(errs[0].Type).To(Equal(field.ErrorTypeRequired))
39-
g.Expect(errs[0].Field).To(Equal("image"))
40-
g.Expect(errs[0].Detail).NotTo(BeEmpty())
37+
g.Expect(errs).To(HaveLen(0))
4138
}
4239

4340
func TestImageTooManyDetails(t *testing.T) {

0 commit comments

Comments
 (0)