mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
NGAlert: Fix flaky test (#33415)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
parent
f5efe97763
commit
be1affe0a4
@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"sort"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -284,7 +285,12 @@ func TestPutAlert(t *testing.T) {
|
||||
|
||||
// We take the "now" time from one of the UpdatedAt.
|
||||
now := alerts[0].UpdatedAt
|
||||
require.Equal(t, c.expAlerts(now), alerts)
|
||||
expAlerts := c.expAlerts(now)
|
||||
|
||||
sort.Sort(types.AlertSlice(expAlerts))
|
||||
sort.Sort(types.AlertSlice(alerts))
|
||||
|
||||
require.Equal(t, expAlerts, alerts)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user