Fix parameters of tests

This commit is contained in:
Zoltán Papp
2024-07-08 17:01:11 +02:00
parent 75f5b75bc4
commit 1f949f8cee
7 changed files with 76 additions and 62 deletions

View File

@@ -9,7 +9,7 @@ import (
log "github.com/sirupsen/logrus"
auth "github.com/netbirdio/netbird/relay/auth/hmac"
"github.com/netbirdio/netbird/relay/auth"
"github.com/netbirdio/netbird/relay/server/listener"
"github.com/netbirdio/netbird/relay/server/listener/udp"
"github.com/netbirdio/netbird/relay/server/listener/ws"
@@ -26,12 +26,13 @@ type Server struct {
wSListener listener.Listener
}
func NewServer(exposedAddress string, tlsSupport bool, authSecret string) *Server {
func NewServer(exposedAddress string, tlsSupport bool, authValidator auth.Validator) *Server {
return &Server{
relay: NewRelay(
exposedAddress,
tlsSupport,
auth.NewTimedHMACValidator(authSecret, 24*time.Hour)),
authValidator,
),
}
}