func TestAllSpecs(t *testing.T) { r := gospec.NewRunner() r.Parallel = false r.BeforeEach = func() { Configure(map[string]string{ "server": "localhost:6379", "process": "1", "database": "15", "pool": "1", }) conn := Config.Pool.Get() conn.Do("flushdb") conn.Close() } // List all specs here r.AddSpec(WorkersSpec) r.AddSpec(ConfigSpec) r.AddSpec(MsgSpec) r.AddSpec(FetchSpec) r.AddSpec(WorkerSpec) r.AddSpec(ManagerSpec) r.AddSpec(ScheduledSpec) r.AddSpec(EnqueueSpec) r.AddSpec(MiddlewareSpec) r.AddSpec(MiddlewareRetrySpec) r.AddSpec(MiddlewareStatsSpec) // Run GoSpec and report any errors to gotest's `testing.T` instance gospec.MainGoTest(r, t) }
func TestAllSpecs(t *testing.T) { r := gospec.NewRunner() r.Parallel = false r.BeforeEach = func() { conn, _ := redis.Dial("tcp", "localhost:6379") conn.Do("select", 15) conn.Do("flushdb") } // List all specs here r.AddSpec(ConfigSpec) r.AddSpec(ConnectionSpec) r.AddSpec(ChanneledConnectionSpec) r.AddSpec(MsgSpec) r.AddSpec(QueueSpec) // Run GoSpec and report any errors to gotest's `testing.T` instance gospec.MainGoTest(r, t) }