//NewAdminMockup creates mockup of admin for testing purposes func NewAdminMockup(user, password, dbName string) (*Admin, error) { db, err := extensions.ConnectMysql(user, password, dbName) if err != nil { return nil, err } admin := NewAdmin("test", "test") admin.db = db return admin, nil }
func init() { var err error cache, err = newStructCache(TestNode{}) if err != nil { panic(err) } db, err = extensions.ConnectMysql("prago", "prago", "prago_test") if err != nil { panic(err) } }