mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2026-04-22 23:57:20 +08:00
16 lines
283 B
Go
16 lines
283 B
Go
package creds
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestString(t *testing.T) {
|
|
AddSecret("admin")
|
|
AddSecret("pa$$word")
|
|
|
|
s := SecretString("rtsp://admin:pa$$word@192.168.1.123/stream1")
|
|
require.Equal(t, "rtsp://***:***@192.168.1.123/stream1", s)
|
|
}
|