mirror of
https://github.com/lovelaze/nebula-sync.git
synced 2025-11-05 18:29:19 +01:00
23 lines
374 B
Go
23 lines
374 B
Go
package log
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/rs/zerolog"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestInit_info(t *testing.T) {
|
|
t.Setenv("NS_DEBUG", "false")
|
|
Init()
|
|
|
|
assert.Equal(t, zerolog.InfoLevel, zerolog.GlobalLevel())
|
|
}
|
|
|
|
func TestInit_debug(t *testing.T) {
|
|
t.Setenv("NS_DEBUG", "true")
|
|
Init()
|
|
|
|
assert.Equal(t, zerolog.DebugLevel, zerolog.GlobalLevel())
|
|
}
|