Message ID | 20221202135137.1728564-8-xsimonar@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | Fixes to multiple Unit and System Tests | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
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 <xsimonar@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 >
Hi Mark On Mon, Dec 12, 2022 at 10:33 PM Mark Michelson <mmichels@redhat.com> wrote: > 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 <xsimonar@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? > > No good reason. I'll send a v2 with grep -F Thanks Xavier > > 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 > > > >
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) 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
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 <xsimonar@redhat.com> --- tests/ovn-northd.at | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)