Speed up labels MySQL tests (#486)

This saves a few seconds per test by only creating 10 hosts rather than
1000. The tests required no further changes as they were not using more
than the first few created hosts.
This commit is contained in:
Zach Wasserman 2021-03-17 10:07:22 -07:00 committed by GitHub
parent 6b1ba2be5c
commit 6a399bc5df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,7 +433,7 @@ func testChangeLabelDetails(t *testing.T, db kolide.Datastore) {
}
func setupLabelSpecsTest(t *testing.T, ds kolide.Datastore) []*kolide.LabelSpec {
for i := 0; i < 1000; i++ {
for i := 0; i < 10; i++ {
_, err := ds.NewHost(&kolide.Host{
DetailUpdateTime: time.Now(),
LabelUpdateTime: time.Now(),