diff --git a/protocols/bgp/server/update_helper_test.go b/protocols/bgp/server/update_helper_test.go index 7ce7a9a6f43f9ca6a129311ffd968d96d3ae65c7..d2d0a7fcf424276b6a351176cebc9a3959f9ec69 100644 --- a/protocols/bgp/server/update_helper_test.go +++ b/protocols/bgp/server/update_helper_test.go @@ -16,7 +16,7 @@ import ( type failingUpdate struct{} -func (f *failingUpdate) SerializeUpdate(opt *packet.EncodingOptions) ([]byte, error) { +func (f *failingUpdate) SerializeUpdate(opt *packet.Options) ([]byte, error) { return nil, errors.New("general error") } @@ -94,7 +94,7 @@ func TestSerializeAndSendUpdate(t *testing.T) { } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - opt := &packet.EncodingOptions{} + opt := &packet.Options{} err := serializeAndSendUpdate(test.buf, test.testUpdate, opt) assert.Equal(t, test.err, err) diff --git a/protocols/bgp/server/withdraw_test.go b/protocols/bgp/server/withdraw_test.go index b4b592ef1ea6f94a588a0378b2723309fed0b202..d8831c3eb526d3afdaceb0a3506bf5dca39c2c41 100644 --- a/protocols/bgp/server/withdraw_test.go +++ b/protocols/bgp/server/withdraw_test.go @@ -54,7 +54,7 @@ func TestWithDrawPrefixes(t *testing.T) { } for _, tc := range testcases { buf := bytes.NewBuffer([]byte{}) - opt := &packet.EncodingOptions{} + opt := &packet.Options{} err := withDrawPrefixes(buf, opt, tc.Prefix...) assert.Equal(t, tc.ExpectedError, err, "error mismatch in testcase %v", tc.Name) assert.Equal(t, tc.Expected, buf.Bytes(), "expected different bytes in testcase %v", tc.Name) @@ -111,7 +111,7 @@ func TestWithDrawPrefixesAddPath(t *testing.T) { } for _, tc := range testcases { buf := bytes.NewBuffer([]byte{}) - opt := &packet.EncodingOptions{} + opt := &packet.Options{} err := withDrawPrefixesAddPath(buf, opt, tc.Prefix, tc.Path) assert.Equal(t, tc.ExpectedError, err, "error mismatch in testcase %v", tc.Name) assert.Equal(t, tc.Expected, buf.Bytes(), "expected different bytes in testcase %v", tc.Name)