Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto committed Aug 25, 2020
1 parent 39f73b9 commit 5b5f1d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/reconciler/testing/v1beta1/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewTrigger(name, namespace, broker string, to ...TriggerOption) *v1beta1.Tr
}

func WithTriggerSubscriberURI(rawurl string) TriggerOption {
uri := apis.HTTP(rawurl)
uri, _ := apis.ParseURL(rawurl)
return func(t *v1beta1.Trigger) {
t.Spec.Subscriber = duckv1.Destination{URI: uri}
}
Expand All @@ -70,7 +70,7 @@ func WithTriggerSubscriberRef(gvk metav1.GroupVersionKind, name, namespace strin
}

func WithTriggerSubscriberRefAndURIReference(gvk metav1.GroupVersionKind, name, namespace string, rawuri string) TriggerOption {
uri := apis.HTTP(rawuri)
uri, _ := apis.ParseURL(rawuri)
return func(t *v1beta1.Trigger) {
t.Spec.Subscriber = duckv1.Destination{
Ref: &duckv1.KReference{
Expand Down Expand Up @@ -148,7 +148,7 @@ func WithTriggerSubscribed() TriggerOption {

func WithTriggerStatusSubscriberURI(uri string) TriggerOption {
return func(t *v1beta1.Trigger) {
u := apis.HTTP(uri)
u, _ := apis.ParseURL(uri)
t.Status.SubscriberURI = u
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/lib/resources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func WithSubscriberServiceRefForTriggerV1(name string) TriggerOptionV1 {

// WithSubscriberURIForTriggerV1Beta1 returns an option that adds a Subscriber URI for the given v1beta1 Trigger.
func WithSubscriberURIForTriggerV1Beta1(uri string) TriggerOptionV1Beta1 {
apisURI := apis.HTTP(uri)
apisURI, _ := apis.ParseURL(uri)
return func(t *eventingv1beta1.Trigger) {
t.Spec.Subscriber = duckv1.Destination{
URI: apisURI,
Expand All @@ -411,7 +411,7 @@ func WithSubscriberURIForTriggerV1Beta1(uri string) TriggerOptionV1Beta1 {

// WithSubscriberURIForTriggerV1 returns an option that adds a Subscriber URI for the given v1 Trigger.
func WithSubscriberURIForTriggerV1(uri string) TriggerOptionV1 {
apisURI := apis.HTTP(uri)
apisURI, _ := apis.ParseURL(uri)
return func(t *eventingv1.Trigger) {
t.Spec.Subscriber = duckv1.Destination{
URI: apisURI,
Expand Down

0 comments on commit 5b5f1d9

Please sign in to comment.