[#1183] node/config: Add notification configuration

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-02-17 15:42:32 +03:00 committed by LeL
parent 90ff066940
commit 46cf15f03c
5 changed files with 48 additions and 0 deletions

View file

@ -31,10 +31,14 @@ func TestNodeSection(t *testing.T) {
attribute := Attributes(empty)
relay := Relay(empty)
persistatePath := PersistentState(empty).Path()
notificationEnabled := Notification(empty).Enabled()
notificationDefaultTopic := Notification(empty).DefaultTopic()
require.Empty(t, attribute)
require.Equal(t, false, relay)
require.Equal(t, PersistentStatePathDefault, persistatePath)
require.Equal(t, false, notificationEnabled)
require.Equal(t, "", notificationDefaultTopic)
var subnetCfg SubnetConfig
@ -60,6 +64,8 @@ func TestNodeSection(t *testing.T) {
relay := Relay(c)
wKey := Wallet(c)
persistatePath := PersistentState(c).Path()
notificationEnabled := Notification(c).Enabled()
notificationDefaultTopic := Notification(c).DefaultTopic()
expectedAddr := []struct {
str string
@ -113,6 +119,8 @@ func TestNodeSection(t *testing.T) {
address.Uint160ToString(wKey.GetScriptHash()))
require.Equal(t, "/state", persistatePath)
require.Equal(t, true, notificationEnabled)
require.Equal(t, "topic", notificationDefaultTopic)
var subnetCfg SubnetConfig