feat: add client call feature switches
This commit is contained in:
+16
-3
@@ -375,9 +375,18 @@ func TestHandleBroadcastCall(t *testing.T) {
|
||||
numUsers := 2
|
||||
helper := TopicTestHelper{}
|
||||
helper.setUp(t, numUsers, types.TopicCatP2P, "p2p-test" /*attach=*/, true)
|
||||
oldThirdParty := store.ThirdPartyConfig
|
||||
globals.iceServers = []iceServer{{Username: "dummy"}}
|
||||
store.ThirdPartyConfig = testThirdPartyConfigStore{
|
||||
"audio_call_enabled": "1",
|
||||
"video_call_enabled": "1",
|
||||
}
|
||||
helper.topic.lastID = 5
|
||||
defer helper.tearDown()
|
||||
defer func() {
|
||||
globals.iceServers = nil
|
||||
store.ThirdPartyConfig = oldThirdParty
|
||||
helper.tearDown()
|
||||
}()
|
||||
helper.mm.EXPECT().Save(types.TenantID(1), gomock.Any(), gomock.Any(), gomock.Any()).
|
||||
Return(&types.MessageSaveResult{SeqId: 1, MarkedReadBySender: true}, nil)
|
||||
|
||||
@@ -401,8 +410,6 @@ func TestHandleBroadcastCall(t *testing.T) {
|
||||
t.Fatal(errorMsgs[0].Ctrl.Text)
|
||||
}
|
||||
|
||||
globals.iceServers = nil
|
||||
|
||||
// Message uid1 -> uid2.
|
||||
for i, m := range helper.results {
|
||||
if i == 0 {
|
||||
@@ -490,9 +497,15 @@ func TestHandleBroadcastCallRequiresStructuredInvite(t *testing.T) {
|
||||
numUsers := 2
|
||||
helper := TopicTestHelper{}
|
||||
helper.setUp(t, numUsers, types.TopicCatP2P, "p2p-test" /*attach=*/, true)
|
||||
oldThirdParty := store.ThirdPartyConfig
|
||||
globals.iceServers = []iceServer{{Username: "dummy"}}
|
||||
store.ThirdPartyConfig = testThirdPartyConfigStore{
|
||||
"audio_call_enabled": "1",
|
||||
"video_call_enabled": "1",
|
||||
}
|
||||
defer func() {
|
||||
globals.iceServers = nil
|
||||
store.ThirdPartyConfig = oldThirdParty
|
||||
helper.tearDown()
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user