forked from TrueCloudLab/frostfs-node
[#798] neofs-node/config: Add persistent_state section
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
005f54e61e
commit
cdb3b71070
5 changed files with 43 additions and 2 deletions
|
@ -30,9 +30,11 @@ func TestNodeSection(t *testing.T) {
|
|||
|
||||
attribute := Attributes(empty)
|
||||
relay := Relay(empty)
|
||||
persistatePath := PersistentState(empty).Path()
|
||||
|
||||
require.Empty(t, attribute)
|
||||
require.Equal(t, false, relay)
|
||||
require.Equal(t, PersistentStatePathDefault, persistatePath)
|
||||
})
|
||||
|
||||
const path = "../../../../config/example/node"
|
||||
|
@ -43,6 +45,7 @@ func TestNodeSection(t *testing.T) {
|
|||
attributes := Attributes(c)
|
||||
relay := Relay(c)
|
||||
wKey := Wallet(c)
|
||||
persistatePath := PersistentState(c).Path()
|
||||
|
||||
expectedAddr := []struct {
|
||||
str string
|
||||
|
@ -94,6 +97,8 @@ func TestNodeSection(t *testing.T) {
|
|||
require.Equal(t,
|
||||
config.StringSafe(c.Sub("node").Sub("wallet"), "address"),
|
||||
address.Uint160ToString(wKey.GetScriptHash()))
|
||||
|
||||
require.Equal(t, "/state", persistatePath)
|
||||
}
|
||||
|
||||
configtest.ForEachFileType(path, fileConfigTest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue