diff --git a/pkg/apis/duck/v1alpha1/channelable_combined_types.go b/pkg/apis/duck/v1alpha1/channelable_combined_types.go index b7be77b56c1..2e77a3f4012 100644 --- a/pkg/apis/duck/v1alpha1/channelable_combined_types.go +++ b/pkg/apis/duck/v1alpha1/channelable_combined_types.go @@ -53,7 +53,7 @@ type ChannelableCombinedSpec struct { SubscribableTypeSpec `json:",inline"` // SubscribableSpec is for the v1beta1 spec compatibility. - //SubscribableSpec eventingduckv1beta1.SubscribableSpec `json:",inline"` + SubscribableSpecv1beta1 eventingduckv1beta1.SubscribableSpec `json:",inline"` // DeliverySpec contains options controlling the event delivery // for the v1beta1 spec compatibility. @@ -80,7 +80,7 @@ type ChannelableCombinedStatus struct { // SubscribableTypeStatus is the v1alpha1 part of the Subscribers status SubscribableTypeStatus `json:",inline"` // SubscribableStatus is the v1beta1 part of the Subscribers status. - //eventingduckv1beta1.SubscribableStatus `json:",inline"` + SubscribableStatusv1beta1 eventingduckv1beta1.SubscribableStatus `json:",inline"` // SubscribableStatusv1 is the v1 part of the Subscribers status. eventingduckv1.SubscribableStatus `json:",inline"` // ErrorChannel is set by the channel when it supports native error handling via a channel @@ -111,7 +111,7 @@ func (c *ChannelableCombined) Populate() { ReplyURI: apis.HTTP("sink2"), }}, } - /*c.Spec.SubscribableSpec = eventingduckv1beta1.SubscribableSpec{ + c.Spec.SubscribableSpecv1beta1 = eventingduckv1beta1.SubscribableSpec{ // Populate ALL fields Subscribers: []eventingduckv1beta1.SubscriberSpec{{ UID: "2f9b5e8e-deb6-11e8-9f32-f2801f1b9fd1", @@ -124,7 +124,7 @@ func (c *ChannelableCombined) Populate() { SubscriberURI: apis.HTTP("call2"), ReplyURI: apis.HTTP("sink2"), }}, - }*/ + } c.Spec.SubscribableSpec = eventingduckv1.SubscribableSpec{ // Populate ALL fields Subscribers: []eventingduckv1.SubscriberSpec{{ @@ -199,9 +199,9 @@ func (c *ChannelableCombined) Populate() { Hostname: "test-domain", }, }, - /*SubscribableStatus: eventingduckv1beta1.SubscribableStatus{ - Subscribers: subscribers, - },*/ + SubscribableStatusv1beta1: eventingduckv1beta1.SubscribableStatus{ + Subscribers: subscribersv1beta1, + }, SubscribableStatus: eventingduckv1.SubscribableStatus{ Subscribers: subscribers, }, diff --git a/pkg/apis/duck/v1alpha1/channelable_combined_types_test.go b/pkg/apis/duck/v1alpha1/channelable_combined_types_test.go index 3c4b43fb449..8d452be3423 100644 --- a/pkg/apis/duck/v1alpha1/channelable_combined_types_test.go +++ b/pkg/apis/duck/v1alpha1/channelable_combined_types_test.go @@ -49,7 +49,7 @@ func TestChannelableCombinedPopulate(t *testing.T) { delay := "5s" want := &ChannelableCombined{ Spec: ChannelableCombinedSpec{ - /*SubscribableSpec: eventingduckv1beta1.SubscribableSpec{ + SubscribableSpecv1beta1: eventingduckv1beta1.SubscribableSpec{ // Populate ALL fields Subscribers: []eventingduckv1beta1.SubscriberSpec{{ UID: "2f9b5e8e-deb6-11e8-9f32-f2801f1b9fd1", @@ -62,7 +62,7 @@ func TestChannelableCombinedPopulate(t *testing.T) { SubscriberURI: apis.HTTP("call2"), ReplyURI: apis.HTTP("sink2"), }}, - },*/ + }, SubscribableSpec: eventingduckv1.SubscribableSpec{ // Populate ALL fields Subscribers: []eventingduckv1.SubscriberSpec{{ @@ -135,7 +135,7 @@ func TestChannelableCombinedPopulate(t *testing.T) { Hostname: "test-domain", }, }, - /*SubscribableStatus: eventingduckv1beta1.SubscribableStatus{ + SubscribableStatusv1beta1: eventingduckv1beta1.SubscribableStatus{ Subscribers: []eventingduckv1beta1.SubscriberStatus{{ UID: "2f9b5e8e-deb6-11e8-9f32-f2801f1b9fd1", ObservedGeneration: 1, @@ -147,7 +147,7 @@ func TestChannelableCombinedPopulate(t *testing.T) { Ready: corev1.ConditionFalse, Message: "Some message", }}, - },*/ + }, SubscribableStatus: eventingduckv1.SubscribableStatus{ Subscribers: []eventingduckv1.SubscriberStatus{{ UID: "2f9b5e8e-deb6-11e8-9f32-f2801f1b9fd1", diff --git a/pkg/reconciler/testing/v1/channelable.go b/pkg/reconciler/testing/v1/channelable.go index 1b97630115f..018f5872b70 100644 --- a/pkg/reconciler/testing/v1/channelable.go +++ b/pkg/reconciler/testing/v1/channelable.go @@ -24,8 +24,8 @@ import ( "knative.dev/eventing/pkg/apis/duck/v1alpha1" "knative.dev/eventing/pkg/apis/messaging" "knative.dev/pkg/apis" - pkgduckv1 "knative.dev/pkg/apis/duck/v1" pkgduckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1" + pkgduckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" ) // Channelable allows us to have a fake channel for testinv1alpha1 @@ -105,7 +105,7 @@ func WithChannelableReady() ChannelableOption { func WithChannelableAddress(a string) ChannelableOption { return func(c *v1alpha1.Channelable) { c.Status.Address = &pkgduckv1alpha1.Addressable{ - Addressablev1: pkgduckv1.Addressable{ + Addressable: pkgduckv1beta1.Addressable{ URL: apis.HTTP(a), }, } diff --git a/vendor/knative.dev/pkg/apis/duck/v1alpha1/addressable_types.go b/vendor/knative.dev/pkg/apis/duck/v1alpha1/addressable_types.go index 6df53e15dbc..328246f6f65 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1alpha1/addressable_types.go +++ b/vendor/knative.dev/pkg/apis/duck/v1alpha1/addressable_types.go @@ -40,8 +40,6 @@ import ( type Addressable struct { v1beta1.Addressable `json:",omitempty"` - Addressablev1 v1.Addressable `json:",omitempty"` - Hostname string `json:"hostname,omitempty"` } @@ -134,12 +132,6 @@ func (t *AddressableType) Populate() { Host: "foo.bar.svc.cluster.local", }, }, - Addressablev1: v1.Addressable{ - URL: &apis.URL{ - Scheme: "http", - Host: "foo.bar.svc.cluster.local", - }, - }, Hostname: "this is not empty", }, }