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/google/uuid"
@@ -16,7 +15,7 @@ func TestReadConversation(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 {
@@ -55,7 +54,7 @@ func TestReadConversation(t *testing.T) {
for _, tc := range tt {
t.Run(tc.Name, func(t *testing.T) {
var rsp pb.ReadConversationResponse
err := h.ReadConversation(context.TODO(), &pb.ReadConversationRequest{
err := h.ReadConversation(microAccountCtx(), &pb.ReadConversationRequest{
Id: tc.ID, GroupId: tc.GroupID,
}, &rsp)
assert.Equal(t, tc.Error, err)