[#690] cmd/neofs-node: Fallback to wallet section if node key is not set

Some users want to specify only wallet section in the SN. It is not
possible if `Key` throws panic on empty value. Instead it should
fallback to wallet section. Panic is suitable if node's key is provided
but invalid.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-07-13 11:43:51 +03:00 committed by Alex Vanin
parent e0500d3158
commit e2f7b3f1cc
3 changed files with 9 additions and 8 deletions

View file

@ -14,9 +14,8 @@ func TestNodeSection(t *testing.T) {
t.Run("defaults", func(t *testing.T) {
empty := configtest.EmptyConfig()
require.PanicsWithError(
require.Panics(
t,
errKeyNotSet.Error(),
func() {
Key(empty)
},