add ctx to interfaces (#105)

* add ctx to interfaces

* use existing context
This commit is contained in:
David Colburn
2021-08-30 20:31:24 -05:00
committed by GitHub
parent 1e10d440c8
commit 1f1eea383f
17 changed files with 321 additions and 267 deletions
+128 -100
View File
@@ -2,6 +2,7 @@
package servicefakes
import (
"context"
"sync"
"time"
@@ -10,11 +11,12 @@ import (
)
type FakeRoomStore struct {
DeleteParticipantStub func(string, string) error
DeleteParticipantStub func(context.Context, string, string) error
deleteParticipantMutex sync.RWMutex
deleteParticipantArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
arg3 string
}
deleteParticipantReturns struct {
result1 error
@@ -22,10 +24,11 @@ type FakeRoomStore struct {
deleteParticipantReturnsOnCall map[int]struct {
result1 error
}
DeleteRoomStub func(string) error
DeleteRoomStub func(context.Context, string) error
deleteRoomMutex sync.RWMutex
deleteRoomArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
}
deleteRoomReturns struct {
result1 error
@@ -33,10 +36,11 @@ type FakeRoomStore struct {
deleteRoomReturnsOnCall map[int]struct {
result1 error
}
ListParticipantsStub func(string) ([]*livekit.ParticipantInfo, error)
ListParticipantsStub func(context.Context, string) ([]*livekit.ParticipantInfo, error)
listParticipantsMutex sync.RWMutex
listParticipantsArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
}
listParticipantsReturns struct {
result1 []*livekit.ParticipantInfo
@@ -46,9 +50,10 @@ type FakeRoomStore struct {
result1 []*livekit.ParticipantInfo
result2 error
}
ListRoomsStub func() ([]*livekit.Room, error)
ListRoomsStub func(context.Context) ([]*livekit.Room, error)
listRoomsMutex sync.RWMutex
listRoomsArgsForCall []struct {
arg1 context.Context
}
listRoomsReturns struct {
result1 []*livekit.Room
@@ -58,11 +63,12 @@ type FakeRoomStore struct {
result1 []*livekit.Room
result2 error
}
LoadParticipantStub func(string, string) (*livekit.ParticipantInfo, error)
LoadParticipantStub func(context.Context, string, string) (*livekit.ParticipantInfo, error)
loadParticipantMutex sync.RWMutex
loadParticipantArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
arg3 string
}
loadParticipantReturns struct {
result1 *livekit.ParticipantInfo
@@ -72,10 +78,11 @@ type FakeRoomStore struct {
result1 *livekit.ParticipantInfo
result2 error
}
LoadRoomStub func(string) (*livekit.Room, error)
LoadRoomStub func(context.Context, string) (*livekit.Room, error)
loadRoomMutex sync.RWMutex
loadRoomArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
}
loadRoomReturns struct {
result1 *livekit.Room
@@ -85,11 +92,12 @@ type FakeRoomStore struct {
result1 *livekit.Room
result2 error
}
LockRoomStub func(string, time.Duration) (string, error)
LockRoomStub func(context.Context, string, time.Duration) (string, error)
lockRoomMutex sync.RWMutex
lockRoomArgsForCall []struct {
arg1 string
arg2 time.Duration
arg1 context.Context
arg2 string
arg3 time.Duration
}
lockRoomReturns struct {
result1 string
@@ -99,11 +107,12 @@ type FakeRoomStore struct {
result1 string
result2 error
}
StoreParticipantStub func(string, *livekit.ParticipantInfo) error
StoreParticipantStub func(context.Context, string, *livekit.ParticipantInfo) error
storeParticipantMutex sync.RWMutex
storeParticipantArgsForCall []struct {
arg1 string
arg2 *livekit.ParticipantInfo
arg1 context.Context
arg2 string
arg3 *livekit.ParticipantInfo
}
storeParticipantReturns struct {
result1 error
@@ -111,10 +120,11 @@ type FakeRoomStore struct {
storeParticipantReturnsOnCall map[int]struct {
result1 error
}
StoreRoomStub func(*livekit.Room) error
StoreRoomStub func(context.Context, *livekit.Room) error
storeRoomMutex sync.RWMutex
storeRoomArgsForCall []struct {
arg1 *livekit.Room
arg1 context.Context
arg2 *livekit.Room
}
storeRoomReturns struct {
result1 error
@@ -122,11 +132,12 @@ type FakeRoomStore struct {
storeRoomReturnsOnCall map[int]struct {
result1 error
}
UnlockRoomStub func(string, string) error
UnlockRoomStub func(context.Context, string, string) error
unlockRoomMutex sync.RWMutex
unlockRoomArgsForCall []struct {
arg1 string
arg1 context.Context
arg2 string
arg3 string
}
unlockRoomReturns struct {
result1 error
@@ -138,19 +149,20 @@ type FakeRoomStore struct {
invocationsMutex sync.RWMutex
}
func (fake *FakeRoomStore) DeleteParticipant(arg1 string, arg2 string) error {
func (fake *FakeRoomStore) DeleteParticipant(arg1 context.Context, arg2 string, arg3 string) error {
fake.deleteParticipantMutex.Lock()
ret, specificReturn := fake.deleteParticipantReturnsOnCall[len(fake.deleteParticipantArgsForCall)]
fake.deleteParticipantArgsForCall = append(fake.deleteParticipantArgsForCall, struct {
arg1 string
arg1 context.Context
arg2 string
}{arg1, arg2})
arg3 string
}{arg1, arg2, arg3})
stub := fake.DeleteParticipantStub
fakeReturns := fake.deleteParticipantReturns
fake.recordInvocation("DeleteParticipant", []interface{}{arg1, arg2})
fake.recordInvocation("DeleteParticipant", []interface{}{arg1, arg2, arg3})
fake.deleteParticipantMutex.Unlock()
if stub != nil {
return stub(arg1, arg2)
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1
@@ -164,17 +176,17 @@ func (fake *FakeRoomStore) DeleteParticipantCallCount() int {
return len(fake.deleteParticipantArgsForCall)
}
func (fake *FakeRoomStore) DeleteParticipantCalls(stub func(string, string) error) {
func (fake *FakeRoomStore) DeleteParticipantCalls(stub func(context.Context, string, string) error) {
fake.deleteParticipantMutex.Lock()
defer fake.deleteParticipantMutex.Unlock()
fake.DeleteParticipantStub = stub
}
func (fake *FakeRoomStore) DeleteParticipantArgsForCall(i int) (string, string) {
func (fake *FakeRoomStore) DeleteParticipantArgsForCall(i int) (context.Context, string, string) {
fake.deleteParticipantMutex.RLock()
defer fake.deleteParticipantMutex.RUnlock()
argsForCall := fake.deleteParticipantArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeRoomStore) DeleteParticipantReturns(result1 error) {
@@ -200,18 +212,19 @@ func (fake *FakeRoomStore) DeleteParticipantReturnsOnCall(i int, result1 error)
}{result1}
}
func (fake *FakeRoomStore) DeleteRoom(arg1 string) error {
func (fake *FakeRoomStore) DeleteRoom(arg1 context.Context, arg2 string) error {
fake.deleteRoomMutex.Lock()
ret, specificReturn := fake.deleteRoomReturnsOnCall[len(fake.deleteRoomArgsForCall)]
fake.deleteRoomArgsForCall = append(fake.deleteRoomArgsForCall, struct {
arg1 string
}{arg1})
arg1 context.Context
arg2 string
}{arg1, arg2})
stub := fake.DeleteRoomStub
fakeReturns := fake.deleteRoomReturns
fake.recordInvocation("DeleteRoom", []interface{}{arg1})
fake.recordInvocation("DeleteRoom", []interface{}{arg1, arg2})
fake.deleteRoomMutex.Unlock()
if stub != nil {
return stub(arg1)
return stub(arg1, arg2)
}
if specificReturn {
return ret.result1
@@ -225,17 +238,17 @@ func (fake *FakeRoomStore) DeleteRoomCallCount() int {
return len(fake.deleteRoomArgsForCall)
}
func (fake *FakeRoomStore) DeleteRoomCalls(stub func(string) error) {
func (fake *FakeRoomStore) DeleteRoomCalls(stub func(context.Context, string) error) {
fake.deleteRoomMutex.Lock()
defer fake.deleteRoomMutex.Unlock()
fake.DeleteRoomStub = stub
}
func (fake *FakeRoomStore) DeleteRoomArgsForCall(i int) string {
func (fake *FakeRoomStore) DeleteRoomArgsForCall(i int) (context.Context, string) {
fake.deleteRoomMutex.RLock()
defer fake.deleteRoomMutex.RUnlock()
argsForCall := fake.deleteRoomArgsForCall[i]
return argsForCall.arg1
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeRoomStore) DeleteRoomReturns(result1 error) {
@@ -261,18 +274,19 @@ func (fake *FakeRoomStore) DeleteRoomReturnsOnCall(i int, result1 error) {
}{result1}
}
func (fake *FakeRoomStore) ListParticipants(arg1 string) ([]*livekit.ParticipantInfo, error) {
func (fake *FakeRoomStore) ListParticipants(arg1 context.Context, arg2 string) ([]*livekit.ParticipantInfo, error) {
fake.listParticipantsMutex.Lock()
ret, specificReturn := fake.listParticipantsReturnsOnCall[len(fake.listParticipantsArgsForCall)]
fake.listParticipantsArgsForCall = append(fake.listParticipantsArgsForCall, struct {
arg1 string
}{arg1})
arg1 context.Context
arg2 string
}{arg1, arg2})
stub := fake.ListParticipantsStub
fakeReturns := fake.listParticipantsReturns
fake.recordInvocation("ListParticipants", []interface{}{arg1})
fake.recordInvocation("ListParticipants", []interface{}{arg1, arg2})
fake.listParticipantsMutex.Unlock()
if stub != nil {
return stub(arg1)
return stub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
@@ -286,17 +300,17 @@ func (fake *FakeRoomStore) ListParticipantsCallCount() int {
return len(fake.listParticipantsArgsForCall)
}
func (fake *FakeRoomStore) ListParticipantsCalls(stub func(string) ([]*livekit.ParticipantInfo, error)) {
func (fake *FakeRoomStore) ListParticipantsCalls(stub func(context.Context, string) ([]*livekit.ParticipantInfo, error)) {
fake.listParticipantsMutex.Lock()
defer fake.listParticipantsMutex.Unlock()
fake.ListParticipantsStub = stub
}
func (fake *FakeRoomStore) ListParticipantsArgsForCall(i int) string {
func (fake *FakeRoomStore) ListParticipantsArgsForCall(i int) (context.Context, string) {
fake.listParticipantsMutex.RLock()
defer fake.listParticipantsMutex.RUnlock()
argsForCall := fake.listParticipantsArgsForCall[i]
return argsForCall.arg1
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeRoomStore) ListParticipantsReturns(result1 []*livekit.ParticipantInfo, result2 error) {
@@ -325,17 +339,18 @@ func (fake *FakeRoomStore) ListParticipantsReturnsOnCall(i int, result1 []*livek
}{result1, result2}
}
func (fake *FakeRoomStore) ListRooms() ([]*livekit.Room, error) {
func (fake *FakeRoomStore) ListRooms(arg1 context.Context) ([]*livekit.Room, error) {
fake.listRoomsMutex.Lock()
ret, specificReturn := fake.listRoomsReturnsOnCall[len(fake.listRoomsArgsForCall)]
fake.listRoomsArgsForCall = append(fake.listRoomsArgsForCall, struct {
}{})
arg1 context.Context
}{arg1})
stub := fake.ListRoomsStub
fakeReturns := fake.listRoomsReturns
fake.recordInvocation("ListRooms", []interface{}{})
fake.recordInvocation("ListRooms", []interface{}{arg1})
fake.listRoomsMutex.Unlock()
if stub != nil {
return stub()
return stub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
@@ -349,12 +364,19 @@ func (fake *FakeRoomStore) ListRoomsCallCount() int {
return len(fake.listRoomsArgsForCall)
}
func (fake *FakeRoomStore) ListRoomsCalls(stub func() ([]*livekit.Room, error)) {
func (fake *FakeRoomStore) ListRoomsCalls(stub func(context.Context) ([]*livekit.Room, error)) {
fake.listRoomsMutex.Lock()
defer fake.listRoomsMutex.Unlock()
fake.ListRoomsStub = stub
}
func (fake *FakeRoomStore) ListRoomsArgsForCall(i int) context.Context {
fake.listRoomsMutex.RLock()
defer fake.listRoomsMutex.RUnlock()
argsForCall := fake.listRoomsArgsForCall[i]
return argsForCall.arg1
}
func (fake *FakeRoomStore) ListRoomsReturns(result1 []*livekit.Room, result2 error) {
fake.listRoomsMutex.Lock()
defer fake.listRoomsMutex.Unlock()
@@ -381,19 +403,20 @@ func (fake *FakeRoomStore) ListRoomsReturnsOnCall(i int, result1 []*livekit.Room
}{result1, result2}
}
func (fake *FakeRoomStore) LoadParticipant(arg1 string, arg2 string) (*livekit.ParticipantInfo, error) {
func (fake *FakeRoomStore) LoadParticipant(arg1 context.Context, arg2 string, arg3 string) (*livekit.ParticipantInfo, error) {
fake.loadParticipantMutex.Lock()
ret, specificReturn := fake.loadParticipantReturnsOnCall[len(fake.loadParticipantArgsForCall)]
fake.loadParticipantArgsForCall = append(fake.loadParticipantArgsForCall, struct {
arg1 string
arg1 context.Context
arg2 string
}{arg1, arg2})
arg3 string
}{arg1, arg2, arg3})
stub := fake.LoadParticipantStub
fakeReturns := fake.loadParticipantReturns
fake.recordInvocation("LoadParticipant", []interface{}{arg1, arg2})
fake.recordInvocation("LoadParticipant", []interface{}{arg1, arg2, arg3})
fake.loadParticipantMutex.Unlock()
if stub != nil {
return stub(arg1, arg2)
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1, ret.result2
@@ -407,17 +430,17 @@ func (fake *FakeRoomStore) LoadParticipantCallCount() int {
return len(fake.loadParticipantArgsForCall)
}
func (fake *FakeRoomStore) LoadParticipantCalls(stub func(string, string) (*livekit.ParticipantInfo, error)) {
func (fake *FakeRoomStore) LoadParticipantCalls(stub func(context.Context, string, string) (*livekit.ParticipantInfo, error)) {
fake.loadParticipantMutex.Lock()
defer fake.loadParticipantMutex.Unlock()
fake.LoadParticipantStub = stub
}
func (fake *FakeRoomStore) LoadParticipantArgsForCall(i int) (string, string) {
func (fake *FakeRoomStore) LoadParticipantArgsForCall(i int) (context.Context, string, string) {
fake.loadParticipantMutex.RLock()
defer fake.loadParticipantMutex.RUnlock()
argsForCall := fake.loadParticipantArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeRoomStore) LoadParticipantReturns(result1 *livekit.ParticipantInfo, result2 error) {
@@ -446,18 +469,19 @@ func (fake *FakeRoomStore) LoadParticipantReturnsOnCall(i int, result1 *livekit.
}{result1, result2}
}
func (fake *FakeRoomStore) LoadRoom(arg1 string) (*livekit.Room, error) {
func (fake *FakeRoomStore) LoadRoom(arg1 context.Context, arg2 string) (*livekit.Room, error) {
fake.loadRoomMutex.Lock()
ret, specificReturn := fake.loadRoomReturnsOnCall[len(fake.loadRoomArgsForCall)]
fake.loadRoomArgsForCall = append(fake.loadRoomArgsForCall, struct {
arg1 string
}{arg1})
arg1 context.Context
arg2 string
}{arg1, arg2})
stub := fake.LoadRoomStub
fakeReturns := fake.loadRoomReturns
fake.recordInvocation("LoadRoom", []interface{}{arg1})
fake.recordInvocation("LoadRoom", []interface{}{arg1, arg2})
fake.loadRoomMutex.Unlock()
if stub != nil {
return stub(arg1)
return stub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
@@ -471,17 +495,17 @@ func (fake *FakeRoomStore) LoadRoomCallCount() int {
return len(fake.loadRoomArgsForCall)
}
func (fake *FakeRoomStore) LoadRoomCalls(stub func(string) (*livekit.Room, error)) {
func (fake *FakeRoomStore) LoadRoomCalls(stub func(context.Context, string) (*livekit.Room, error)) {
fake.loadRoomMutex.Lock()
defer fake.loadRoomMutex.Unlock()
fake.LoadRoomStub = stub
}
func (fake *FakeRoomStore) LoadRoomArgsForCall(i int) string {
func (fake *FakeRoomStore) LoadRoomArgsForCall(i int) (context.Context, string) {
fake.loadRoomMutex.RLock()
defer fake.loadRoomMutex.RUnlock()
argsForCall := fake.loadRoomArgsForCall[i]
return argsForCall.arg1
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeRoomStore) LoadRoomReturns(result1 *livekit.Room, result2 error) {
@@ -510,19 +534,20 @@ func (fake *FakeRoomStore) LoadRoomReturnsOnCall(i int, result1 *livekit.Room, r
}{result1, result2}
}
func (fake *FakeRoomStore) LockRoom(arg1 string, arg2 time.Duration) (string, error) {
func (fake *FakeRoomStore) LockRoom(arg1 context.Context, arg2 string, arg3 time.Duration) (string, error) {
fake.lockRoomMutex.Lock()
ret, specificReturn := fake.lockRoomReturnsOnCall[len(fake.lockRoomArgsForCall)]
fake.lockRoomArgsForCall = append(fake.lockRoomArgsForCall, struct {
arg1 string
arg2 time.Duration
}{arg1, arg2})
arg1 context.Context
arg2 string
arg3 time.Duration
}{arg1, arg2, arg3})
stub := fake.LockRoomStub
fakeReturns := fake.lockRoomReturns
fake.recordInvocation("LockRoom", []interface{}{arg1, arg2})
fake.recordInvocation("LockRoom", []interface{}{arg1, arg2, arg3})
fake.lockRoomMutex.Unlock()
if stub != nil {
return stub(arg1, arg2)
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1, ret.result2
@@ -536,17 +561,17 @@ func (fake *FakeRoomStore) LockRoomCallCount() int {
return len(fake.lockRoomArgsForCall)
}
func (fake *FakeRoomStore) LockRoomCalls(stub func(string, time.Duration) (string, error)) {
func (fake *FakeRoomStore) LockRoomCalls(stub func(context.Context, string, time.Duration) (string, error)) {
fake.lockRoomMutex.Lock()
defer fake.lockRoomMutex.Unlock()
fake.LockRoomStub = stub
}
func (fake *FakeRoomStore) LockRoomArgsForCall(i int) (string, time.Duration) {
func (fake *FakeRoomStore) LockRoomArgsForCall(i int) (context.Context, string, time.Duration) {
fake.lockRoomMutex.RLock()
defer fake.lockRoomMutex.RUnlock()
argsForCall := fake.lockRoomArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeRoomStore) LockRoomReturns(result1 string, result2 error) {
@@ -575,19 +600,20 @@ func (fake *FakeRoomStore) LockRoomReturnsOnCall(i int, result1 string, result2
}{result1, result2}
}
func (fake *FakeRoomStore) StoreParticipant(arg1 string, arg2 *livekit.ParticipantInfo) error {
func (fake *FakeRoomStore) StoreParticipant(arg1 context.Context, arg2 string, arg3 *livekit.ParticipantInfo) error {
fake.storeParticipantMutex.Lock()
ret, specificReturn := fake.storeParticipantReturnsOnCall[len(fake.storeParticipantArgsForCall)]
fake.storeParticipantArgsForCall = append(fake.storeParticipantArgsForCall, struct {
arg1 string
arg2 *livekit.ParticipantInfo
}{arg1, arg2})
arg1 context.Context
arg2 string
arg3 *livekit.ParticipantInfo
}{arg1, arg2, arg3})
stub := fake.StoreParticipantStub
fakeReturns := fake.storeParticipantReturns
fake.recordInvocation("StoreParticipant", []interface{}{arg1, arg2})
fake.recordInvocation("StoreParticipant", []interface{}{arg1, arg2, arg3})
fake.storeParticipantMutex.Unlock()
if stub != nil {
return stub(arg1, arg2)
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1
@@ -601,17 +627,17 @@ func (fake *FakeRoomStore) StoreParticipantCallCount() int {
return len(fake.storeParticipantArgsForCall)
}
func (fake *FakeRoomStore) StoreParticipantCalls(stub func(string, *livekit.ParticipantInfo) error) {
func (fake *FakeRoomStore) StoreParticipantCalls(stub func(context.Context, string, *livekit.ParticipantInfo) error) {
fake.storeParticipantMutex.Lock()
defer fake.storeParticipantMutex.Unlock()
fake.StoreParticipantStub = stub
}
func (fake *FakeRoomStore) StoreParticipantArgsForCall(i int) (string, *livekit.ParticipantInfo) {
func (fake *FakeRoomStore) StoreParticipantArgsForCall(i int) (context.Context, string, *livekit.ParticipantInfo) {
fake.storeParticipantMutex.RLock()
defer fake.storeParticipantMutex.RUnlock()
argsForCall := fake.storeParticipantArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeRoomStore) StoreParticipantReturns(result1 error) {
@@ -637,18 +663,19 @@ func (fake *FakeRoomStore) StoreParticipantReturnsOnCall(i int, result1 error) {
}{result1}
}
func (fake *FakeRoomStore) StoreRoom(arg1 *livekit.Room) error {
func (fake *FakeRoomStore) StoreRoom(arg1 context.Context, arg2 *livekit.Room) error {
fake.storeRoomMutex.Lock()
ret, specificReturn := fake.storeRoomReturnsOnCall[len(fake.storeRoomArgsForCall)]
fake.storeRoomArgsForCall = append(fake.storeRoomArgsForCall, struct {
arg1 *livekit.Room
}{arg1})
arg1 context.Context
arg2 *livekit.Room
}{arg1, arg2})
stub := fake.StoreRoomStub
fakeReturns := fake.storeRoomReturns
fake.recordInvocation("StoreRoom", []interface{}{arg1})
fake.recordInvocation("StoreRoom", []interface{}{arg1, arg2})
fake.storeRoomMutex.Unlock()
if stub != nil {
return stub(arg1)
return stub(arg1, arg2)
}
if specificReturn {
return ret.result1
@@ -662,17 +689,17 @@ func (fake *FakeRoomStore) StoreRoomCallCount() int {
return len(fake.storeRoomArgsForCall)
}
func (fake *FakeRoomStore) StoreRoomCalls(stub func(*livekit.Room) error) {
func (fake *FakeRoomStore) StoreRoomCalls(stub func(context.Context, *livekit.Room) error) {
fake.storeRoomMutex.Lock()
defer fake.storeRoomMutex.Unlock()
fake.StoreRoomStub = stub
}
func (fake *FakeRoomStore) StoreRoomArgsForCall(i int) *livekit.Room {
func (fake *FakeRoomStore) StoreRoomArgsForCall(i int) (context.Context, *livekit.Room) {
fake.storeRoomMutex.RLock()
defer fake.storeRoomMutex.RUnlock()
argsForCall := fake.storeRoomArgsForCall[i]
return argsForCall.arg1
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeRoomStore) StoreRoomReturns(result1 error) {
@@ -698,19 +725,20 @@ func (fake *FakeRoomStore) StoreRoomReturnsOnCall(i int, result1 error) {
}{result1}
}
func (fake *FakeRoomStore) UnlockRoom(arg1 string, arg2 string) error {
func (fake *FakeRoomStore) UnlockRoom(arg1 context.Context, arg2 string, arg3 string) error {
fake.unlockRoomMutex.Lock()
ret, specificReturn := fake.unlockRoomReturnsOnCall[len(fake.unlockRoomArgsForCall)]
fake.unlockRoomArgsForCall = append(fake.unlockRoomArgsForCall, struct {
arg1 string
arg1 context.Context
arg2 string
}{arg1, arg2})
arg3 string
}{arg1, arg2, arg3})
stub := fake.UnlockRoomStub
fakeReturns := fake.unlockRoomReturns
fake.recordInvocation("UnlockRoom", []interface{}{arg1, arg2})
fake.recordInvocation("UnlockRoom", []interface{}{arg1, arg2, arg3})
fake.unlockRoomMutex.Unlock()
if stub != nil {
return stub(arg1, arg2)
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1
@@ -724,17 +752,17 @@ func (fake *FakeRoomStore) UnlockRoomCallCount() int {
return len(fake.unlockRoomArgsForCall)
}
func (fake *FakeRoomStore) UnlockRoomCalls(stub func(string, string) error) {
func (fake *FakeRoomStore) UnlockRoomCalls(stub func(context.Context, string, string) error) {
fake.unlockRoomMutex.Lock()
defer fake.unlockRoomMutex.Unlock()
fake.UnlockRoomStub = stub
}
func (fake *FakeRoomStore) UnlockRoomArgsForCall(i int) (string, string) {
func (fake *FakeRoomStore) UnlockRoomArgsForCall(i int) (context.Context, string, string) {
fake.unlockRoomMutex.RLock()
defer fake.unlockRoomMutex.RUnlock()
argsForCall := fake.unlockRoomArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeRoomStore) UnlockRoomReturns(result1 error) {