From 558b0916b9c946b5863c800dde6ebb2a46519e05 Mon Sep 17 00:00:00 2001 From: Rama Chavali Date: Fri, 26 Nov 2021 12:32:12 +0530 Subject: [PATCH] add minor test case to envoy filter sort (#36242) Signed-off-by: Rama Chavali --- pilot/pkg/model/push_context_test.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pilot/pkg/model/push_context_test.go b/pilot/pkg/model/push_context_test.go index ad1dd2aea56d..d06a226b60d7 100644 --- a/pilot/pkg/model/push_context_test.go +++ b/pilot/pkg/model/push_context_test.go @@ -390,10 +390,24 @@ func TestEnvoyFilterOrder(t *testing.T) { }, }, }, + { + Meta: config.Meta{Name: "super-high-priority", Namespace: "testns", GroupVersionKind: gvk.EnvoyFilter}, + Spec: &networking.EnvoyFilter{ + Priority: -10, + ConfigPatches: []*networking.EnvoyFilter_EnvoyConfigObjectPatch{ + { + Patch: &networking.EnvoyFilter_Patch{}, + Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{ + Proxy: &networking.EnvoyFilter_ProxyMatch{ProxyVersion: `foobar`}, + }, + }, + }, + }, + }, } expectedns := []string{ - "testns/high-priority", "testns/default-priority", "testns/a-medium-priority", + "testns/super-high-priority", "testns/high-priority", "testns/default-priority", "testns/a-medium-priority", "testns/b-medium-priority", "testns/b-low-priority", "testns/a-low-priority", }