fix test flake

This commit is contained in:
Tejal Desai 2020-01-31 15:23:38 -08:00
parent de4b7344a7
commit 5a4a6c4a17
1 changed files with 6 additions and 0 deletions

View File

@ -1300,6 +1300,12 @@ func TestUpdateWhitelist(t *testing.T) {
whitelist = initialWhitelist
defer func() { whitelist = initialWhitelist }()
UpdateWhitelist(tt.whitelistVarRun)
sort.Slice(tt.expected, func(i, j int) bool {
return tt.expected[i].Path < tt.expected[j].Path
})
sort.Slice(whitelist, func(i, j int) bool {
return whitelist[i].Path < whitelist[j].Path
})
testutil.CheckDeepEqual(t, tt.expected, whitelist)
})
}