diff --git a/accounts/pkg/proto/v0/accounts.pb.micro_test.go b/accounts/pkg/proto/v0/accounts.pb.micro_test.go index b8e3eeb4d8..003746f4f1 100644 --- a/accounts/pkg/proto/v0/accounts.pb.micro_test.go +++ b/accounts/pkg/proto/v0/accounts.pb.micro_test.go @@ -13,11 +13,10 @@ import ( mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v4" empty "github.com/golang/protobuf/ptypes/empty" "github.com/owncloud/ocis/accounts/pkg/config" + "github.com/owncloud/ocis/accounts/pkg/logging" "github.com/owncloud/ocis/accounts/pkg/proto/v0" svc "github.com/owncloud/ocis/accounts/pkg/service/v0" - oclog "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/service/grpc" - "github.com/owncloud/ocis/ocis-pkg/shared" settings "github.com/owncloud/ocis/settings/pkg/proto/v0" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" @@ -83,10 +82,17 @@ func init() { cfg.Repo.Backend = "disk" cfg.Repo.Disk.Path = dataPath cfg.DemoUsersAndGroups = true + cfg.Log = &config.Log{} var hdlr *svc.Service var err error - if hdlr, err = svc.New(svc.Logger(oclog.LoggerFromConfig("accounts", shared.Log(cfg.Log))), svc.Config(cfg), svc.RoleService(buildRoleServiceMock())); err != nil { + hdlr, err = svc.New( + svc.Logger(logging.Configure(cfg.Service.Name, cfg.Log)), + svc.Config(cfg), + svc.RoleService(buildRoleServiceMock()), + ) + + if err != nil { log.Fatalf("Could not create new service") } @@ -494,7 +500,7 @@ func TestUpdateAccount(t *testing.T) { GidNumber: 30001, Mail: "एलिस@उदाहरण.com", }, - merrors.BadRequest(".", "preferred_name 'अद्भुत-एलिस' must be at least the local part of an email"), + merrors.BadRequest("com.owncloud.api.accounts", "preferred_name 'अद्भुत-एलिस' must be at least the local part of an email"), }, { "Update user with empty data values", @@ -506,7 +512,7 @@ func TestUpdateAccount(t *testing.T) { GidNumber: 0, Mail: "", }, - merrors.BadRequest(".", "preferred_name '' must be at least the local part of an email"), + merrors.BadRequest("com.owncloud.api.accounts", "preferred_name '' must be at least the local part of an email"), }, { "Update user with strange data", @@ -518,7 +524,7 @@ func TestUpdateAccount(t *testing.T) { GidNumber: 1000, Mail: "1.2@3.c_@", }, - merrors.BadRequest(".", "mail '1.2@3.c_@' must be a valid email"), + merrors.BadRequest("com.owncloud.api.accounts", "mail '1.2@3.c_@' must be a valid email"), }, } diff --git a/ocis-pkg/crypto/crypto_test.go b/ocis-pkg/crypto/crypto_test.go index 9bfa55274c..328607ba9e 100644 --- a/ocis-pkg/crypto/crypto_test.go +++ b/ocis-pkg/crypto/crypto_test.go @@ -16,7 +16,7 @@ var _ = Describe("Crypto", func() { var ( userConfigDir string err error - config = cfg.New() + config = cfg.DefaultConfig() ) BeforeEach(func() { diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index 7f641022b7..faffe9e461 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -547,7 +547,7 @@ func init() { Path: dataPath, }, }, - Log: accountsCfg.Log{ + Log: &accountsCfg.Log{ Level: "info", Pretty: true, Color: true, @@ -694,7 +694,7 @@ func getService() svc.Service { TokenManager: config.TokenManager{ JWTSecret: jwtSecret, }, - Log: config.Log{ + Log: &config.Log{ Level: "debug", }, } diff --git a/proxy/pkg/proxy/proxy_integration_test.go b/proxy/pkg/proxy/proxy_integration_test.go index 9809383a67..0137b4413e 100644 --- a/proxy/pkg/proxy/proxy_integration_test.go +++ b/proxy/pkg/proxy/proxy_integration_test.go @@ -10,8 +10,6 @@ import ( "net/url" "testing" - "github.com/owncloud/ocis/ocis-pkg/shared" - "github.com/owncloud/ocis/proxy/pkg/config" ) @@ -215,7 +213,7 @@ func (tc *testCase) expectProxyTo(strURL string) testCase { func testConfig(policy []config.Policy) *config.Config { return &config.Config{ - Log: &shared.Log{}, + Log: &config.Log{}, Debug: config.Debug{}, HTTP: config.HTTP{}, Tracing: config.Tracing{},