Skip to content

Commit

Permalink
Fix stringSliceEqual function when strings are out of order
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed Sep 29, 2022
1 parent 788b9d7 commit a1678ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nodeup/pkg/model/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package model
import (
"fmt"
"path/filepath"
"sort"
"testing"
"time"

Expand Down Expand Up @@ -137,6 +138,8 @@ func TestTaintsApplied(t *testing.T) {
}

func stringSlicesEqual(exp, other []string) bool {
sort.Sort(sort.StringSlice(exp))
sort.Sort(sort.StringSlice(other))
if exp == nil && other != nil {
return false
}
Expand Down

0 comments on commit a1678ad

Please sign in to comment.