forked from TrueCloudLab/frostfs-node
[#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:
parent
e0500d3158
commit
e2f7b3f1cc
3 changed files with 9 additions and 8 deletions
|
@ -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)
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue