From fb82e3e648be68faf7fa2d15ec1d984768cc22cf Mon Sep 17 00:00:00 2001 From: Alexander Yastrebov Date: Mon, 26 Aug 2024 17:45:43 +0200 Subject: [PATCH] options: test filter registration order Test that builtin and CustomFilters are registered before RegisterFilters callback. Follow up on #3203 Signed-off-by: Alexander Yastrebov --- skipper_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skipper_test.go b/skipper_test.go index c5d7ba47a5..fc7c7df7ed 100644 --- a/skipper_test.go +++ b/skipper_test.go @@ -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()