restore logLevel: debug
This commit is contained in:
parent
0d4d81c333
commit
b21efeb28f
|
@ -11,6 +11,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
)
|
||||
|
||||
func writeTempFile(byts []byte) (string, error) {
|
||||
|
@ -30,10 +32,10 @@ func writeTempFile(byts []byte) (string, error) {
|
|||
|
||||
func TestConfFromFile(t *testing.T) {
|
||||
func() {
|
||||
tmpf, err := writeTempFile([]byte(
|
||||
tmpf, err := writeTempFile([]byte("logLevel: debug\n" +
|
||||
"paths:\n" +
|
||||
" cam1:\n" +
|
||||
" runOnDemandStartTimeout: 5s\n"))
|
||||
" cam1:\n" +
|
||||
" runOnDemandStartTimeout: 5s\n"))
|
||||
require.NoError(t, err)
|
||||
defer os.Remove(tmpf)
|
||||
|
||||
|
@ -41,6 +43,8 @@ func TestConfFromFile(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.Equal(t, true, hasFile)
|
||||
|
||||
require.Equal(t, LogLevel(logger.Debug), conf.LogLevel)
|
||||
|
||||
pa, ok := conf.Paths["cam1"]
|
||||
require.Equal(t, true, ok)
|
||||
require.Equal(t, &PathConf{
|
||||
|
|
|
@ -16,7 +16,7 @@ type Level int
|
|||
|
||||
// Log levels.
|
||||
const (
|
||||
Debug Level = iota
|
||||
Debug Level = iota + 1
|
||||
Info
|
||||
Warn
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue