From 34ee01b7d8a60aadd5050585a943edfc997d04c4 Mon Sep 17 00:00:00 2001 From: QxBytes Date: Tue, 21 Jan 2025 13:41:18 -0800 Subject: [PATCH] sort expected values --- npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go b/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go index 02cf9c5a4f..5d02040b46 100644 --- a/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go +++ b/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go @@ -387,7 +387,12 @@ func verifyHNSCache(t *testing.T, expected map[string]hcn.SetPolicySetting, hns copyOfCachedObj := *cacheObj copyOfCachedObj.Values = strings.Join(members, ",") - require.Equal(t, setObj, copyOfCachedObj, setName+" mismatch in cache") + expectedMembers := strings.Split(setObj.Values, ",") + sort.Strings(expectedMembers) + copyOfExpectedObj := setObj + copyOfExpectedObj.Values = strings.Join(expectedMembers, ",") + + require.Equal(t, copyOfExpectedObj, copyOfCachedObj, setName+" mismatch in cache") } }