From d55c21561bdb775b5724d03cdab859023e1ed161 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 built-in 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..c47bc979b5 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 built-in and CustomFilters are already registered + assert.Contains(t, registry, filters.SetRequestHeaderName) + assert.Contains(t, registry, filters.BearerInjectorName) }, } fr := o.filterRegistry()