Skip to content
Snippets Groups Projects
Commit 41f80dd9 authored by Oliver Herms's avatar Oliver Herms
Browse files

Fix tests

parent 7e79fb77
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ go_library(
deps = [
"//apps/bmp-streamer/pkg/bmpstreamer:go_default_library",
"//net:go_default_library",
"//net/api:go_default_library",
"//protocols/bgp/packet:go_default_library",
"//protocols/bgp/server:go_default_library",
"//route:go_default_library",
......
......@@ -63,26 +63,26 @@ func TestUpdateToRIBUpdate(t *testing.T) {
},
expected: &pb.RIBUpdate{
Peer: &apinet.IP{
Lower: 220,
IsLegacy: true,
Lower: 220,
Version: apinet.IP_IPv4,
},
Advertisement: true,
Route: &apiroute.Route{
Pfx: &apinet.Prefix{
Address: &apinet.IP{
Lower: 200,
IsLegacy: true,
Lower: 200,
Version: apinet.IP_IPv4,
},
Pfxlen: 8,
},
Paths: []*apiroute.Path{
{
Type: route.BGPPathType,
Type: apiroute.Path_BGP,
BGPPath: &apiroute.BGPPath{
PathIdentifier: 10,
NextHop: &apinet.IP{
Lower: 210,
IsLegacy: true,
Lower: 210,
Version: apinet.IP_IPv4,
},
LocalPref: 20,
ASPath: []*apiroute.ASPathSegment{
......@@ -96,8 +96,8 @@ func TestUpdateToRIBUpdate(t *testing.T) {
EBGP: true,
BGPIdentifier: 1337,
Source: &apinet.IP{
Lower: 220,
IsLegacy: true,
Lower: 220,
Version: apinet.IP_IPv4,
},
Communities: []uint32{10000, 20000},
LargeCommunities: []*apiroute.LargeCommunity{
......
......@@ -6,8 +6,8 @@ proto_library(
srcs = ["bmp.proto"],
visibility = ["//visibility:public"],
deps = [
"//net/api:bio_net_proto",
"//route/api:bio_route_proto",
"//github.com/bio-routing/bio-rd/net/api:api_proto",
"//github.com/bio-routing/bio-rd/route/api:api_proto",
],
)
......@@ -18,8 +18,8 @@ go_proto_library(
proto = ":bmpstreamer_proto",
visibility = ["//visibility:public"],
deps = [
"//net/api:go_default_library",
"//route/api:go_default_library",
"//github.com/bio-routing/bio-rd/net/api:go_default_library",
"//github.com/bio-routing/bio-rd/route/api:go_default_library",
"//vendor/google.golang.org/grpc:go_default_library", # keep
],
)
......
......@@ -2,8 +2,8 @@ syntax = "proto3";
package bmpstreamer;
import "net/api/net.proto";
import "route/api/route.proto";
import "github.com/bio-routing/bio-rd/net/api/net.proto";
import "github.com/bio-routing/bio-rd/route/api/route.proto";
service RIBService {
rpc adjRIBInStream(AdjRIBInStreamRequest) returns (stream RIBUpdate);
......
......@@ -5,7 +5,7 @@ proto_library(
name = "bio_route_proto",
srcs = ["route.proto"],
visibility = ["//visibility:public"],
deps = ["//net/api:bio_net_proto"],
deps = ["//github.com/bio-routing/bio-rd/net/api:api_proto"],
)
go_proto_library(
......@@ -13,7 +13,7 @@ go_proto_library(
importpath = "github.com/bio-routing/bio-rd/route/api",
proto = ":bio_route_proto",
visibility = ["//visibility:public"],
deps = ["//net/api:go_default_library"],
deps = ["//github.com/bio-routing/bio-rd/net/api:go_default_library"],
)
go_library(
......
......@@ -2,7 +2,7 @@ syntax = "proto3";
package bio.route;
import "net/api/net.proto";
import "github.com/bio-routing/bio-rd/net/api/net.proto";
message Route {
bio.net.Prefix pfx = 1;
......
......@@ -184,8 +184,8 @@ func TestBGPPathToProto(t *testing.T) {
expected: &pb.BGPPath{
PathIdentifier: 10,
NextHop: &netapi.IP{
Lower: 210,
Version: api.IP_IPv4,
Lower: 210,
Version: netapi.IP_IPv4,
},
LocalPref: 20,
ASPath: []*pb.ASPathSegment{
......@@ -199,8 +199,8 @@ func TestBGPPathToProto(t *testing.T) {
EBGP: true,
BGPIdentifier: 1337,
Source: &netapi.IP{
Lower: 220,
IsLegacy: true,
Lower: 220,
Version: netapi.IP_IPv4,
},
Communities: []uint32{10000, 20000},
LargeCommunities: []*pb.LargeCommunity{
......
......@@ -22,8 +22,8 @@ func TestStaticToProto(t *testing.T) {
},
expected: &api.StaticPath{
NextHop: &apinet.IP{
IsLegacy: true,
Lower: 123,
Version: apinet.IP_IPv4,
Lower: 123,
},
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment