Skip to content

Commit

Permalink
options: test filter registration order (#3208)
Browse files Browse the repository at this point in the history
Test that built-in and CustomFilters are registered before RegisterFilters callback.

Follow up on #3203

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov committed Aug 26, 2024
1 parent 2ad395d commit ba12cf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skipper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func TestOptionsFilterRegistry(t *testing.T) {
CustomFilters: []filters.Spec{auth.NewBearerInjector(nil)},
RegisterFilters: func(registry filters.Registry) {
registry.Register(auth.NewWebhook(0))

// Check that built-in and CustomFilters are already registered
assert.Contains(t, registry, filters.SetRequestHeaderName)
assert.Contains(t, registry, filters.BearerInjectorName)
},
}
fr := o.filterRegistry()
Expand Down

0 comments on commit ba12cf7

Please sign in to comment.