diff --git a/pkg/rancher/kdmimages/kdmimages_test.go b/pkg/rancher/kdmimages/kdmimages_test.go index 8d21cd8..d448b80 100644 --- a/pkg/rancher/kdmimages/kdmimages_test.go +++ b/pkg/rancher/kdmimages/kdmimages_test.go @@ -1,6 +1,7 @@ package kdmimages import ( + "sort" "testing" "github.com/stretchr/testify/assert" @@ -13,6 +14,7 @@ func Test_filterDeprecatedVersions(t *testing.T) { "v1.21.2", } v := filterDeprecatedVersions(testVersions) + sort.Strings(v) if !assert.Equal(t, []string{"v1.21.2"}, v) { return } @@ -28,12 +30,14 @@ func Test_filterDeprecatedVersions(t *testing.T) { "v1.28.3", } v = filterDeprecatedVersions(testVersions) + sort.Strings(v) if !assert.Equal(t, []string{"v1.21.2", "v1.22.2", "v1.28.3"}, v) { return } t.Logf("filterDeprecatedVersions: %v", v) v = filterDeprecatedVersions([]string{}) + sort.Strings(v) if !assert.Equal(t, []string{}, v) { return }