MCPcopy
hub / github.com/osrg/gobgp / Test_LocalPrefAttribute

Function Test_LocalPrefAttribute

pkg/apiutil/attribute_test.go:146–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

144}
145
146func Test_LocalPrefAttribute(t *testing.T) {
147 assert := assert.New(t)
148
149 input := &api.LocalPrefAttribute{
150 LocalPref: 100,
151 }
152
153 a := &api.Attribute{Attr: &api.Attribute_LocalPref{LocalPref: input}}
154 n, err := UnmarshalAttribute(a)
155 assert.NoError(err)
156
157 output, _ := NewLocalPrefAttributeFromNative(n.(*bgp.PathAttributeLocalPref))
158 assert.True(proto.Equal(input, output))
159}
160
161func Test_AtomicAggregateAttribute(t *testing.T) {
162 assert := assert.New(t)

Callers

nothing calls this directly

Calls 3

UnmarshalAttributeFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…