Skip to content

Commit

Permalink
Increase Trigger validation test coverage (#5306)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok authored Apr 26, 2021
1 parent a62ed6a commit 0d25138
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/apis/eventing/v1/trigger_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ func TestTriggerValidation(t *testing.T) {
t *Trigger
want *apis.FieldError
}{{
name: "valid injection",
t: &Trigger{
ObjectMeta: v1.ObjectMeta{
Namespace: "test-ns",
Annotations: map[string]string{
InjectionAnnotation: validInjectionAnnotation,
}},
Spec: TriggerSpec{
Broker: "default",
Filter: validEmptyFilter,
Subscriber: validSubscriber,
}},
want: nil,
}, {
name: "invalid trigger spec",
t: &Trigger{Spec: TriggerSpec{}},
want: func() *apis.FieldError {
Expand Down

0 comments on commit 0d25138

Please sign in to comment.