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

Function Test_NextHopAttribute

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

Source from the content-addressed store, hash-verified

114}
115
116func Test_NextHopAttribute(t *testing.T) {
117 assert := assert.New(t)
118
119 input := &api.NextHopAttribute{
120 NextHop: "192.168.0.1",
121 }
122
123 a := &api.Attribute{Attr: &api.Attribute_NextHop{NextHop: input}}
124 n, err := UnmarshalAttribute(a)
125 assert.NoError(err)
126
127 output, _ := NewNextHopAttributeFromNative(n.(*bgp.PathAttributeNextHop))
128 assert.True(proto.Equal(input, output))
129}
130
131func Test_MultiExitDiscAttribute(t *testing.T) {
132 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…