multi tenant threads (#78)

* multitenant threads

* auth for v1
This commit is contained in:
Dominic Wong
2021-03-25 17:33:20 +00:00
committed by GitHub
parent c42aeaa0a9
commit 8e38c8b834
20 changed files with 149 additions and 76 deletions

View File

@@ -1,7 +1,6 @@
package handler_test
import (
"context"
"testing"
"github.com/micro/services/threads/handler"
@@ -17,7 +16,7 @@ func TestCreateMessage(t *testing.T) {
// seed some data
var cRsp pb.CreateConversationResponse
err := h.CreateConversation(context.TODO(), &pb.CreateConversationRequest{
err := h.CreateConversation(microAccountCtx(), &pb.CreateConversationRequest{
Topic: "HelloWorld", GroupId: uuid.New().String(),
}, &cRsp)
if err != nil {
@@ -84,7 +83,7 @@ func TestCreateMessage(t *testing.T) {
for _, tc := range tt {
t.Run(tc.Name, func(t *testing.T) {
var rsp pb.CreateMessageResponse
err := h.CreateMessage(context.TODO(), &pb.CreateMessageRequest{
err := h.CreateMessage(microAccountCtx(), &pb.CreateMessageRequest{
AuthorId: tc.AuthorID,
ConversationId: tc.ConversationID,
Text: tc.Text,