forked from TrueCloudLab/frostfs-node
[#493] node/config: Implement ENV variable key constructor
Add `internal.Env` function which converts path to config value to ENV variable key. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
270b147205
commit
099ceeae50
2 changed files with 29 additions and 0 deletions
15
cmd/neofs-node/config/internal/env_test.go
Normal file
15
cmd/neofs-node/config/internal/env_test.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package internal_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/internal"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestEnv(t *testing.T) {
|
||||
require.Equal(t,
|
||||
"NEOFS_SECTION_PARAMETER",
|
||||
internal.Env("section", "parameter"),
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue