On 12/2/22 08:51, Xavier Simonart wrote:
Tests was (unluckily) failing as grepping 10.0.0.11 (and expecting an IP)
and catching a UUID such as 103090811468
Signed-off-by: Xavier Simonart <xsimo...@redhat.com>
---
tests/ovn-northd.at | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 78edad9ae..47c761927 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -2225,14 +2225,13 @@ check ovn-nbctl acl-add sw0 to-lport 1002 'outport == "sw0-p1"
&& ip4.src == 10.
check ovn-nbctl acl-add sw0 to-lport 1002 'outport == "sw0-p1" && ip4.src ==
10.0.0.13' allow
check ovn-nbctl acl-add pg0 to-lport 1002 'outport == "pg0" && ip4.src ==
10.0.0.11' drop
-acl1=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10.0.0.12' | head -1)
-acl2=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10.0.0.13' |
head -1)
-acl3=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10.0.0.11' |
head -1)
+acl1=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10\.0.0.12'
| head -1)
+acl2=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10\.0.0.13'
| head -1)
+acl3=$(ovn-nbctl --bare --column _uuid,match find acl | grep -B1 '10\.0.0.11'
| head -1)
In a previous change where you needed to match on exact strings, you
used `grep -F` . Why not do the same thing here?
check ovn-nbctl set acl $acl1 log=true severity=alert meter=meter_me
name=acl_one
check ovn-nbctl set acl $acl2 log=true severity=info meter=meter_me
name=acl_two
check ovn-nbctl set acl $acl3 log=true severity=info meter=meter_me
name=acl_three
check ovn-nbctl --wait=sb sync
-
check_row_count nb:meter 1
check_column meter_me nb:meter name
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev