Esempio n. 1
0
// Initializes a store for program information. If a database URL was given, a
// Postgres store is initialized, otherwise an in-memory store is used.
func initStore(databaseURL string) store.Store {
	if databaseURL == "" {
		st, err := memstore.NewMemstore()
		if err != nil {
			log.Fatal(err)
		}
		return st
	}

	log.Fatal("Postgres adapter not yet implemented")
	return nil
}
Esempio n. 2
0
// Doesn't really touch much of anything useful.
func (s *EndpointSuite) TestBuildRouter() {
	st, err := memstore.NewMemstore()
	assert.Nil(s.T(), err)
	_ = BuildRouter(st)
}
Esempio n. 3
0
func (s *CardSuite) SetupTest() {
	st, err := memstore.NewMemstore()
	assert.Nil(s.T(), err)
	s.router = BuildRouter(st)
	s.store = st
}