1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

Fix TestParseProtocolBgp()

Fix test method TestParseProtocolBgp() to match the output of the
current ProtocolsBgp() method wich returns Parsed records instead of a
string array.
This commit is contained in:
Patrick Seeburger 2018-09-28 12:08:36 +02:00 committed by Benedikt Rudolph
parent 08c63fc3a3
commit b7952f9061

View file

@ -53,14 +53,7 @@ func TestParseProtocolBgp(t *testing.T) {
p := parseProtocols(f)
log.Printf("%# v", pretty.Formatter(p))
lines := p["protocols"].([]string)
protocols := []Parsed{}
for _, v := range lines {
p2 := parseProtocol(v)
protocols = append(protocols, p2)
}
protocols := p["protocols"].(Parsed)
if len(protocols) != 3 {
//log.Printf("%# v", pretty.Formatter(protocols))
@ -68,7 +61,6 @@ func TestParseProtocolBgp(t *testing.T) {
}
fmt.Println(protocols)
}
func TestParseRoutesAllIpv4Bird1(t *testing.T) {