return an error in case the random number generator fails

This commit is contained in:
aler9
2023-07-30 22:36:44 +02:00
committed by Alessandro Ros
parent 577d6f3a28
commit 8b8b52e689
24 changed files with 325 additions and 127 deletions

View File

@@ -1045,7 +1045,8 @@ func TestServerSessionTeardown(t *testing.T) {
}
func TestServerAuth(t *testing.T) {
nonce := auth.GenerateNonce()
nonce, err := auth.GenerateNonce()
require.NoError(t, err)
s := &Server{
Handler: &testServerHandler{
@@ -1068,7 +1069,7 @@ func TestServerAuth(t *testing.T) {
RTSPAddress: "localhost:8554",
}
err := s.Start()
err = s.Start()
require.NoError(t, err)
defer s.Close()