Skip to content

Commit

Permalink
datapath/linux/route: fix CI expectations for rule string format
Browse files Browse the repository at this point in the history
When CI is running it expects the fib rule format without the new
protocol, so it breaks when matching the string formats with the
expected ones. Fix it by adding the protocol.

Fixes: d0cca9d ("datapath/linux/route: add support for rule protocol")
Signed-off-by: Nikolay Aleksandrov <nikolay@isovalent.com>
  • Loading branch information
Nikolay Aleksandrov authored and julianwiedmann committed Mar 27, 2023
1 parent 0253771 commit cbf09e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/datapath/linux/route/route_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,36 @@ func (p *RouteSuitePrivileged) TestRule_String(c *C) {
From: fakeIP,
To: fakeIP2,
},
wantStr: "0: from 10.10.10.10/32 to 1.1.1.1/32 lookup 0",
wantStr: "0: from 10.10.10.10/32 to 1.1.1.1/32 lookup 0 proto unspec",
},
{
name: "contains priority",
rule: Rule{
Priority: 1,
},
wantStr: "1: from all to all lookup 0",
wantStr: "1: from all to all lookup 0 proto unspec",
},
{
name: "contains table",
rule: Rule{
Table: 1,
},
wantStr: "0: from all to all lookup 1",
wantStr: "0: from all to all lookup 1 proto unspec",
},
{
name: "contains mark and mask",
rule: Rule{
Mark: 1,
Mask: 1,
},
wantStr: "0: from all to all lookup 0 mark 0x1 mask 0x1",
wantStr: "0: from all to all lookup 0 mark 0x1 mask 0x1 proto unspec",
},
{
name: "main table",
rule: Rule{
Table: unix.RT_TABLE_MAIN,
},
wantStr: "0: from all to all lookup main",
wantStr: "0: from all to all lookup main proto unspec",
},
}
for _, tt := range tests {
Expand Down

0 comments on commit cbf09e7

Please sign in to comment.