update proxy to use go-micro v3

This commit is contained in:
A.Unger
2021-02-18 08:01:53 +00:00
committed by Jörn Friedrich Dreyer
parent 75c3b7d81b
commit a1d5e34f41
6 changed files with 121 additions and 13 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"net/http"
"github.com/micro/go-micro/v2/client/grpc"
"github.com/asim/go-micro/plugins/client/grpc/v3"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/oidc"
"github.com/owncloud/ocis/proxy/pkg/config"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"
"github.com/micro/go-micro/v2/client"
"github.com/asim/go-micro/v3/client"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/oidc"
"github.com/owncloud/ocis/proxy/pkg/config"
+4 -4
View File
@@ -4,6 +4,8 @@ import (
"crypto/tls"
"os"
"github.com/asim/go-micro/v3"
svc "github.com/owncloud/ocis/ocis-pkg/service/http"
"github.com/owncloud/ocis/proxy/pkg/crypto"
)
@@ -55,12 +57,10 @@ func Server(opts ...Option) (svc.Service, error) {
svc.Address(options.Config.HTTP.Addr),
svc.Context(options.Context),
svc.Flags(options.Flags...),
svc.Handler(chain),
)
if err := service.Init(); err != nil {
l.Fatal().Err(err).Msgf("Error initializing")
}
micro.RegisterHandler(service.Server(), chain)
service.Init()
return service, nil
}
+3 -2
View File
@@ -2,15 +2,16 @@ package backend
import (
"context"
"testing"
"github.com/asim/go-micro/v3/client"
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
"github.com/micro/go-micro/v2/client"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/oidc"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
"github.com/rs/zerolog"
"github.com/stretchr/testify/assert"
"testing"
)
var mockAccResp = []*accounts.Account{