(t *testing.T)
| 90 | } |
| 91 | |
| 92 | func Test_AsPathAttribute(t *testing.T) { |
| 93 | assert := assert.New(t) |
| 94 | |
| 95 | input := &api.AsPathAttribute{ |
| 96 | Segments: []*api.AsSegment{ |
| 97 | { |
| 98 | Type: 1, // SET |
| 99 | Numbers: []uint32{100, 200}, |
| 100 | }, |
| 101 | { |
| 102 | Type: 2, // SEQ |
| 103 | Numbers: []uint32{300, 400}, |
| 104 | }, |
| 105 | }, |
| 106 | } |
| 107 | |
| 108 | a := &api.Attribute{Attr: &api.Attribute_AsPath{AsPath: input}} |
| 109 | n, err := UnmarshalAttribute(a) |
| 110 | assert.NoError(err) |
| 111 | |
| 112 | output, _ := NewAsPathAttributeFromNative(n.(*bgp.PathAttributeAsPath)) |
| 113 | assert.True(proto.Equal(input, output)) |
| 114 | } |
| 115 | |
| 116 | func Test_NextHopAttribute(t *testing.T) { |
| 117 | assert := assert.New(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…