Skip to content

Commit

Permalink
Increase Subscription validation test coverage (#5305)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok authored Apr 26, 2021
1 parent 0d25138 commit 978778a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/apis/messaging/v1/subscription_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,21 @@ func TestSubscriptionSpecValidation(t *testing.T) {
},
},
want: apis.ErrMissingField("subscriber.ref.name"),
}, {
name: "missing name in Subscriber.Ref",
c: &SubscriptionSpec{
Channel: getValidChannelRef(),
Subscriber: getValidDestination(),
Reply: &duckv1.Destination{
Ref: &duckv1.KReference{
Namespace: namespace,
Name: "",
Kind: channelKind,
APIVersion: channelAPIVersion,
},
},
},
want: apis.ErrMissingField("reply.ref.name"),
}}

for _, test := range tests {
Expand Down

0 comments on commit 978778a

Please sign in to comment.