Skip to content

Commit

Permalink
options: test filter registration order
Browse files Browse the repository at this point in the history
Test that builtin and CustomFilters are registered before RegisterFilters callback.

Follow up on #3203

Signed-off-by: Alexander Yastrebov <[email protected]>
  • Loading branch information
AlexanderYastrebov committed Aug 26, 2024
1 parent 2ad395d commit fb82e3e
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 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 fb82e3e

Please sign in to comment.