Fix host ordering in mongodb unit tests
This commit is contained in:
parent
34416e0da8
commit
387bae9b9f
|
@ -1,6 +1,7 @@
|
||||||
package mongodb
|
package mongodb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -152,7 +153,8 @@ func TestAddShardHostStats(t *testing.T) {
|
||||||
assert.True(t, acc.HasTag("mongodb_shard_stats", "hostname"))
|
assert.True(t, acc.HasTag("mongodb_shard_stats", "hostname"))
|
||||||
hostsFound = append(hostsFound, host)
|
hostsFound = append(hostsFound, host)
|
||||||
}
|
}
|
||||||
|
sort.Strings(hostsFound)
|
||||||
|
sort.Strings(expectedHosts)
|
||||||
assert.Equal(t, hostsFound, expectedHosts)
|
assert.Equal(t, hostsFound, expectedHosts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue