Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Updates to test without filter #2701

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/e2e/trigger_dependency_annotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func TestTriggerDependencyAnnotation(t *testing.T) {
client.CreatePodOrFail(pod, lib.WithService(subscriberName))

// Create triggers.
client.CreateTriggerOrFail(triggerName,
resources.WithSubscriberServiceRefForTrigger(subscriberName),
resources.WithDependencyAnnotaionTrigger(dependencyAnnotation),
client.CreateTriggerOrFailV1Beta1(triggerName,
resources.WithSubscriberServiceRefForTriggerV1Beta1(subscriberName),
resources.WithDependencyAnnotationTriggerV1Beta1(dependencyAnnotation),
)

data := fmt.Sprintf("Test trigger-annotation %s", uuid.NewUUID())
Expand Down
14 changes: 12 additions & 2 deletions test/lib/resources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ func WithAttributesTriggerFilterV1Beta1(eventSource, eventType string, extension
}
}

// WithDependencyAnnotaionTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotaionTrigger(dependencyAnnotation string) TriggerOption {
// WithDependencyAnnotationTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotationTrigger(dependencyAnnotation string) TriggerOption {
return func(t *eventingv1alpha1.Trigger) {
if t.Annotations == nil {
t.Annotations = make(map[string]string)
Expand All @@ -304,6 +304,16 @@ func WithDependencyAnnotaionTrigger(dependencyAnnotation string) TriggerOption {
}
}

// WithDependencyAnnotationTrigger returns an option that adds a dependency annotation to the given Trigger.
func WithDependencyAnnotationTriggerV1Beta1(dependencyAnnotation string) TriggerOptionV1Beta1 {
return func(t *eventingv1beta1.Trigger) {
if t.Annotations == nil {
t.Annotations = make(map[string]string)
}
t.Annotations[eventingv1beta1.DependencyAnnotation] = dependencyAnnotation
}
}

// WithBroker returns an option that adds a Broker for the given Trigger.
func WithBroker(brokerName string) TriggerOption {
return func(t *eventingv1alpha1.Trigger) {
Expand Down