[#356] netmap: Check for attribute duplicates in NodeInfo.readFromV2()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
684050b570
commit
88bc9eeb26
2 changed files with 1 additions and 1 deletions
|
@ -52,6 +52,7 @@ func (x *NodeInfo) readFromV2(m netmap.NodeInfo, checkFieldPresence bool) error
|
|||
} else if _, ok := mAttr[key]; ok {
|
||||
return fmt.Errorf("duplicate attributes %s", key)
|
||||
}
|
||||
mAttr[key] = struct{}{}
|
||||
|
||||
switch {
|
||||
case key == attrCapacity:
|
||||
|
|
|
@ -271,7 +271,6 @@ func TestNodeInfo_Unmarshal(t *testing.T) {
|
|||
fmt.Sprintf("invalid %s attribute", attrCapacity))
|
||||
})
|
||||
t.Run("duplicate attributes", func(t *testing.T) {
|
||||
t.Skip("FIXME")
|
||||
n := goodNodeInfo()
|
||||
|
||||
var a netmap.Attribute
|
||||
|
|
Loading…
Add table
Reference in a new issue