Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sorted the result of GetDosProtectedThatReferencedDosLogConf in unit …
Browse files Browse the repository at this point in the history
…test to make it deterministic
ciarams87 committed Dec 20, 2021
1 parent 6dddcb2 commit e0a8810
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1320,6 +1320,9 @@ func TestGetDosProtectedThatReferencedDosLogConf(t *testing.T) {
for _, test := range tests {
resources := dosConf.GetDosProtectedThatReferencedDosLogConf(test.policyNamespace + "/" + test.policyName)
if diff := cmp.Diff(test.expected, resources); diff != "" {
sort.SliceStable(resources, func(i, j int) bool {
return resources[i].Name < resources[j].Name
})
t.Errorf("GetDosProtectedThatReferencedDosLogConf() returned unexpected result for the case of: %v (-want +got):\n%s", test.msg, diff)
}
}

0 comments on commit e0a8810

Please sign in to comment.