- Revert typos in turnCfg string

- merge main
This commit is contained in:
Zoltan Papp
2024-07-08 15:05:29 +02:00
286 changed files with 11781 additions and 6153 deletions

View File

@@ -1,6 +1,7 @@
package server
import (
"context"
"crypto/hmac"
"crypto/sha1"
"encoding/base64"
@@ -46,7 +47,7 @@ func TestTimeBasedAuthSecretsManager_SetupRefresh(t *testing.T) {
secret := "some_secret"
peersManager := NewPeersUpdateManager(nil)
peer := "some_peer"
updateChannel := peersManager.CreateChannel(peer)
updateChannel := peersManager.CreateChannel(context.Background(), peer)
tested := NewTimeBasedAuthSecretsManager(peersManager, &TURNConfig{
CredentialsTTL: ttl,
@@ -54,7 +55,7 @@ func TestTimeBasedAuthSecretsManager_SetupRefresh(t *testing.T) {
Turns: []*Host{TurnTestHost},
}, "")
tested.SetupRefresh(peer)
tested.SetupRefresh(context.Background(), peer)
if _, ok := tested.cancelMap[peer]; !ok {
t.Errorf("expecting peer to be present in a cancel map, got not present")
@@ -102,7 +103,7 @@ func TestTimeBasedAuthSecretsManager_CancelRefresh(t *testing.T) {
Turns: []*Host{TurnTestHost},
}, "")
tested.SetupRefresh(peer)
tested.SetupRefresh(context.Background(), peer)
if _, ok := tested.cancelMap[peer]; !ok {
t.Errorf("expecting peer to be present in a cancel map, got not present")
}