Increase Subscription validation test coverage
@@ -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 {
