Fix tests
This commit is contained in:
parent
9e9773c9c7
commit
e2d662608c
@ -65,7 +65,7 @@ func TestCacheKey(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("DifferentMetadata", func(t *testing.T) {
|
t.Run("DifferentMetadata", func(t *testing.T) {
|
||||||
mdCtx := metadata.Set(context.TODO(), "foo", "bar")
|
mdCtx := metadata.Set(context.TODO(), "Micro-Namespace", "bar")
|
||||||
key1 := key(mdCtx, &req1)
|
key1 := key(mdCtx, &req1)
|
||||||
key2 := key(ctx, &req1)
|
key2 := key(ctx, &req1)
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v2/auth"
|
"github.com/micro/go-micro/v2/auth"
|
||||||
"github.com/micro/go-micro/v2/errors"
|
|
||||||
"github.com/micro/go-micro/v2/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/v2/metadata"
|
"github.com/micro/go-micro/v2/metadata"
|
||||||
"github.com/micro/go-micro/v2/server"
|
"github.com/micro/go-micro/v2/server"
|
||||||
)
|
)
|
||||||
@ -361,6 +361,10 @@ func TestAuthHandler(t *testing.T) {
|
|||||||
}
|
}
|
||||||
if !handlerCalled {
|
if !handlerCalled {
|
||||||
t.Errorf("Expected the handler be called")
|
t.Errorf("Expected the handler be called")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
type testClient struct {
|
type testClient struct {
|
||||||
callCount int
|
callCount int
|
||||||
callRsp interface{}
|
callRsp interface{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user