forked from grassrootseconomics/visedriver
Rehabilitate tests
This commit is contained in:
@@ -55,14 +55,6 @@ func (ms *MenuStorageService) getOrCreateDb(ctx context.Context, existingDb db.D
|
||||
connStr := ms.conn.String()
|
||||
dbTyp := ms.conn.DbType()
|
||||
if dbTyp == DBTYPE_POSTGRES {
|
||||
// // Ensure the schema exists
|
||||
// err = ensureSchemaExists(ctx, connStr, schema)
|
||||
// if err != nil {
|
||||
// return nil, fmt.Errorf("failed to ensure schema exists: %w", err)
|
||||
// }
|
||||
//
|
||||
// newDb = postgres.NewPgDb().WithSchema(schema)
|
||||
|
||||
newDb = postgres.NewPgDb()
|
||||
} else if dbTyp == DBTYPE_GDBM {
|
||||
err = ms.ensureDbDir()
|
||||
|
||||
@@ -17,17 +17,19 @@ import (
|
||||
"git.grassecon.net/urdt/ussd/internal/testutil/testservice"
|
||||
"git.grassecon.net/urdt/ussd/internal/testutil/testtag"
|
||||
"git.grassecon.net/urdt/ussd/remote"
|
||||
testdataloader "github.com/peteole/testdata-loader"
|
||||
)
|
||||
|
||||
var (
|
||||
logg = logging.NewVanilla()
|
||||
baseDir = testdataloader.GetBasePath()
|
||||
scriptDir = path.Join(baseDir, "services", "registration")
|
||||
selectedDatabase = ""
|
||||
selectedDbSchema = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
initializers.LoadEnvVariables()
|
||||
initializers.LoadEnvVariablesPath(baseDir)
|
||||
}
|
||||
|
||||
// SetDatabase updates the database used by TestEngine
|
||||
|
||||
Reference in New Issue
Block a user