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 <[email protected]>
  • Loading branch information
AlexanderYastrebov authored and Pushpalanka committed Oct 11, 2024
1 parent 830f049 commit 5faba40
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 5faba40

Please sign in to comment.