chore(pkger): make export test assertions deterministic

pull/17982/head
Johnny Steenbergen 2020-05-06 13:19:38 -07:00 committed by Johnny Steenbergen
parent f575ea8d41
commit ce2baee4d6
1 changed files with 3 additions and 0 deletions

View File

@ -2666,6 +2666,9 @@ func TestService(t *testing.T) {
sum := newPkg.Summary()
teles := sum.TelegrafConfigs
sort.Slice(teles, func(i, j int) bool {
return teles[i].TelegrafConfig.Name < teles[j].TelegrafConfig.Name
})
require.Len(t, teles, len(resourcesToClone))
for i := range resourcesToClone {