From f45254bb5dd413b11a75087636c0b6c59ad5fec6 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 27 Oct 2021 13:56:22 +0200 Subject: [PATCH] set backend to disk in tests --- accounts/pkg/proto/v0/accounts.pb.micro_test.go | 1 + accounts/pkg/service/v0/accounts_permission_test.go | 1 + ocis-pkg/indexer/index/disk/non_unique_test.go | 1 + ocis-pkg/indexer/index/disk/unique_test.go | 1 + ocis-pkg/indexer/indexer_test.go | 1 + ocs/pkg/server/http/svc_test.go | 1 + 6 files changed, 6 insertions(+) diff --git a/accounts/pkg/proto/v0/accounts.pb.micro_test.go b/accounts/pkg/proto/v0/accounts.pb.micro_test.go index fa2ec37580..bcd53c9746 100644 --- a/accounts/pkg/proto/v0/accounts.pb.micro_test.go +++ b/accounts/pkg/proto/v0/accounts.pb.micro_test.go @@ -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 diff --git a/accounts/pkg/service/v0/accounts_permission_test.go b/accounts/pkg/service/v0/accounts_permission_test.go index 6ebe751404..477369b663 100644 --- a/accounts/pkg/service/v0/accounts_permission_test.go +++ b/accounts/pkg/service/v0/accounts_permission_test.go @@ -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() diff --git a/ocis-pkg/indexer/index/disk/non_unique_test.go b/ocis-pkg/indexer/index/disk/non_unique_test.go index b9f592d612..5d0a25ca08 100644 --- a/ocis-pkg/indexer/index/disk/non_unique_test.go +++ b/ocis-pkg/indexer/index/disk/non_unique_test.go @@ -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, }, diff --git a/ocis-pkg/indexer/index/disk/unique_test.go b/ocis-pkg/indexer/index/disk/unique_test.go index 2ecbfbe17e..fca28895ec 100644 --- a/ocis-pkg/indexer/index/disk/unique_test.go +++ b/ocis-pkg/indexer/index/disk/unique_test.go @@ -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, }, diff --git a/ocis-pkg/indexer/indexer_test.go b/ocis-pkg/indexer/indexer_test.go index 47440f1a27..baf27a5117 100644 --- a/ocis-pkg/indexer/indexer_test.go +++ b/ocis-pkg/indexer/indexer_test.go @@ -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, }, diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index 28d4f4d1fd..ee896414fc 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -542,6 +542,7 @@ func init() { DemoUsersAndGroups: true, }, Repo: accountsCfg.Repo{ + Backend: "disk", Disk: accountsCfg.Disk{ Path: dataPath, },