7 "git.curoverse.com/arvados.git/sdk/go/arvados"
8 check "gopkg.in/check.v1"
11 var _ = check.Suite(&serverSuite{})
13 type serverSuite struct {
16 func testConfig() *wsConfig {
17 cfg := defaultConfig()
18 cfg.Client = *(arvados.NewClientFromEnv())
19 cfg.Postgres = testDBConfig()
24 // TestBadDB ensures Run() returns an error (instead of panicking or
25 // deadlocking) if it can't connect to the database server at startup.
26 func (s *serverSuite) TestBadDB(c *check.C) {
28 cfg.Postgres["password"] = "1234"
29 srv := &server{wsConfig: cfg}
35 c.Check(err, check.NotNil)
44 done := make(chan bool)
51 case <-time.After(10 * time.Second):
56 func newTestServer() *server {
57 srv := &server{wsConfig: testConfig()}