Orders results of the GetAll remote clusters store method (#27548)

This commit is contained in:
Miguel de la Cruz 2024-07-05 13:53:47 +02:00 committed by GitHub
parent e5a3dd7fea
commit b596430920
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -14,8 +14,6 @@ import (
)
func TestGetRemoteClusters(t *testing.T) {
t.Skip("MM-59324")
t.Run("Should not work if the remote cluster service is not enabled", func(t *testing.T) {
th := Setup(t)
defer th.TearDown()

View File

@ -172,7 +172,8 @@ func (s sqlRemoteClusterStore) GetAll(offset, limit int, filter model.RemoteClus
query := s.getQueryBuilder().
Select(remoteClusterFields("rc")...).
From("RemoteClusters rc")
From("RemoteClusters rc").
OrderBy("rc.DisplayName, rc.Name")
if filter.InChannel != "" {
query = query.Where("rc.RemoteId IN (SELECT scr.RemoteId FROM SharedChannelRemotes scr WHERE scr.ChannelId = ?)", filter.InChannel)