diff --git a/cmd/neofs-node/config/calls_test.go b/cmd/neofs-node/config/calls_test.go index e6da971b..6408447c 100644 --- a/cmd/neofs-node/config/calls_test.go +++ b/cmd/neofs-node/config/calls_test.go @@ -1,9 +1,11 @@ package config_test import ( + "os" "testing" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config" + "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/internal" configtest "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/test" "github.com/stretchr/testify/require" ) @@ -25,3 +27,18 @@ func TestConfigCommon(t *testing.T) { require.Nil(t, val) }) } + +func TestConfigEnv(t *testing.T) { + const ( + name = "name" + section = "section" + value = "some value" + ) + + err := os.Setenv(internal.Env(section, name), value) + require.NoError(t, err) + + c := configtest.EmptyConfig() + + require.Equal(t, value, c.Sub(section).Value(name)) +}