fleet/server/test_util.go
Zachary Wasserman 8f16bd8bcc Send configuration + label queries in distributed reads (#215)
This PR is the beginning of distributed query work. For now we are focusing on using the distributed query subsystem to retrieve the basic configuration information (currently just platform), and run the label queries.

A mockable clock interface is also added to the service struct, allowing us to inject a clock as a dependency, and write unit tests that can control the time.
2016-09-20 20:08:11 -07:00

16 lines
491 B
Go

package server
import (
"github.com/WatchBeam/clock"
kitlog "github.com/go-kit/kit/log"
"github.com/kolide/kolide-ose/config"
"github.com/kolide/kolide-ose/kolide"
)
func newTestService(ds kolide.Datastore) (kolide.Service, error) {
return NewService(ds, kitlog.NewNopLogger(), config.TestConfig(), nil, clock.C)
}
func newTestServiceWithClock(ds kolide.Datastore, c clock.Clock) (kolide.Service, error) {
return NewService(ds, kitlog.NewNopLogger(), config.TestConfig(), nil, c)
}