set backend to disk in tests

This commit is contained in:
Willy Kloucek
2021-10-27 13:56:22 +02:00
parent ef406c8baa
commit f45254bb5d
6 changed files with 6 additions and 0 deletions
@@ -80,6 +80,7 @@ func init() {
)
cfg := config.New()
cfg.Repo.Backend = "disk"
cfg.Repo.Disk.Path = dataPath
cfg.Server.DemoUsersAndGroups = true
var hdlr *svc.Service
@@ -33,6 +33,7 @@ var (
func init() {
cfg := config.New()
cfg.Server.Name = "accounts"
cfg.Repo.Backend = "disk"
cfg.Repo.Disk.Path = dataPath
logger := olog.NewLogger(olog.Color(true), olog.Pretty(true))
roleServiceMock = buildRoleServiceMock()
@@ -83,6 +83,7 @@ func getNonUniqueIdxSut(t *testing.T, entity interface{}, indexBy string) (index
dataPath, _ := WriteIndexTestData(Data, "ID", "")
cfg := config.Config{
Repo: config.Repo{
Backend: "disk",
Disk: config.Disk{
Path: dataPath,
},
@@ -103,6 +103,7 @@ func getUniqueIdxSut(t *testing.T, indexBy string, entityType interface{}) (inde
dataPath, _ := WriteIndexTestData(Data, "ID", "")
cfg := config.Config{
Repo: config.Repo{
Backend: "disk",
Disk: config.Disk{
Path: dataPath,
},
+1
View File
@@ -300,6 +300,7 @@ func TestQueryDiskImpl(t *testing.T) {
func createDiskIndexer(dataDir string) *Indexer {
return CreateIndexer(&config.Config{
Repo: config.Repo{
Backend: "disk",
Disk: config.Disk{
Path: dataDir,
},
+1
View File
@@ -542,6 +542,7 @@ func init() {
DemoUsersAndGroups: true,
},
Repo: accountsCfg.Repo{
Backend: "disk",
Disk: accountsCfg.Disk{
Path: dataPath,
},