Skip to content

Commit

Permalink
chore: fix flaky tenant disconnect test
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 authored Nov 23, 2022
1 parent e8d248c commit d8ba20e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cmd/tenant/disconnect/disconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package disconnect
import (
"errors"
"fmt"
"sort"
"strings"

"github.com/AlecAivazis/survey/v2"
"github.com/MakeNowJust/heredoc/v2"
Expand Down Expand Up @@ -215,7 +217,10 @@ func getCurrentlyConnectedProjects(tenant *tenants.Tenant, getProjectCallback sh
}
projects = append(projects, project)
}

sort.SliceStable(projects, func(i int, j int) bool {
res := strings.Compare(projects[i].Name, projects[j].Name)
return res == -1
})
return projects, nil
}

Expand Down

0 comments on commit d8ba20e

Please sign in to comment.