Fix host ordering in mongodb unit tests

This commit is contained in:
Daniel Nelson 2018-04-10 17:24:40 -07:00
parent 6ef237437d
commit da6a299a22
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package mongodb
import (
"sort"
"testing"
"time"
@ -152,7 +153,8 @@ func TestAddShardHostStats(t *testing.T) {
assert.True(t, acc.HasTag("mongodb_shard_stats", "hostname"))
hostsFound = append(hostsFound, host)
}
sort.Strings(hostsFound)
sort.Strings(expectedHosts)
assert.Equal(t, hostsFound, expectedHosts)
}