// NewServer returns a new instance of Server. func NewServer(c *run.Config) *Server { srv, _ := run.NewServer(c, "testServer") s := Server{ Server: srv, Config: c, } configureLogging(&s) return &s }
// NewServer returns a new instance of Server. func NewServer(c *run.Config) *Server { srv, _ := run.NewServer(c, "testServer") s := Server{ Server: srv, Config: c, } s.TSDBStore.EngineOptions.Config = c.Data configureLogging(&s) return &s }
// OpenServerWithVersion opens a test server with a specific version. func OpenServerWithVersion(c *run.Config, version string) *Server { srv, _ := run.NewServer(c, version) s := Server{ Server: srv, Config: c, } configureLogging(&s) if err := s.Open(); err != nil { panic(err.Error()) } return &s }
// NewServer returns a new instance of Server. func NewServer(c *run.Config) *Server { buildInfo := &run.BuildInfo{ Version: "testServer", Commit: "testCommit", Branch: "testBranch", } srv, _ := run.NewServer(c, buildInfo) s := Server{ Server: srv, Config: c, } return &s }
// NewServer returns a new instance of Server. func NewServer(c *run.Config) *Server { buildInfo := &run.BuildInfo{ Version: "testServer", Commit: "testCommit", Branch: "testBranch", } srv, _ := run.NewServer(c, buildInfo) s := Server{ Server: srv, Config: c, } s.TSDBStore.EngineOptions.Config = c.Data configureLogging(&s) return &s }
// OpenServerWithVersion opens a test server with a specific version. func OpenServerWithVersion(c *run.Config, version string) *Server { buildInfo := &run.BuildInfo{ Version: version, Commit: "", Branch: "", } srv, _ := run.NewServer(c, buildInfo) s := Server{ Server: srv, Config: c, } configureLogging(&s) if err := s.Open(); err != nil { panic(err.Error()) } return &s }