forked from TrueCloudLab/frostfs-node
Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
42554a9298
commit
923f84722a
934 changed files with 3470 additions and 3451 deletions
30
cmd/frostfs-node/config/logger/config_test.go
Normal file
30
cmd/frostfs-node/config/logger/config_test.go
Normal file
|
@ -0,0 +1,30 @@
|
|||
package loggerconfig_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
||||
loggerconfig "github.com/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/logger"
|
||||
configtest "github.com/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestLoggerSection_Level(t *testing.T) {
|
||||
t.Run("defaults", func(t *testing.T) {
|
||||
v := loggerconfig.Level(configtest.EmptyConfig())
|
||||
require.Equal(t, loggerconfig.LevelDefault, v)
|
||||
})
|
||||
|
||||
const path = "../../../../config/example/node"
|
||||
|
||||
var fileConfigTest = func(c *config.Config) {
|
||||
v := loggerconfig.Level(c)
|
||||
require.Equal(t, "debug", v)
|
||||
}
|
||||
|
||||
configtest.ForEachFileType(path, fileConfigTest)
|
||||
|
||||
t.Run("ENV", func(t *testing.T) {
|
||||
configtest.ForEnvFileType(path, fileConfigTest)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue