frostfs-sdk-go/netmap/node_info_test.go
Leonard Lyubich ca523f1ff1 [#227] netmap: Refactor and document package functionality
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-15 20:50:32 +03:00

24 lines
389 B
Go

package netmap
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestNodeInfo_SetAttribute(t *testing.T) {
var n NodeInfo
const key = "some key"
val := "some value"
require.Zero(t, n.Attribute(val))
n.SetAttribute(key, val)
require.Equal(t, val, n.Attribute(key))
val = "some other value"
n.SetAttribute(key, val)
require.Equal(t, val, n.Attribute(key))
}