Skip to content

Commit

Permalink
tests: Make sure the port group is not hardcoded
Browse files Browse the repository at this point in the history
The port group name consists of DP key and NB PG name.
Use first PG that is avaiable to avoid flakes when
neither of the logical switches has DP key 2.

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
almusil authored and putnopvut committed Aug 24, 2023
1 parent 9ea2cd6 commit f80bd64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -32491,9 +32491,9 @@ AT_CHECK([test $(ovs-ofctl dump-flows br-int table=46 | grep conjunction | wc -l

for i in $(seq 1 10); do
# Delete and recreate the SB PG with same name and content.
sb_pg_name=2_pg1 # dp key + NB pg name
sb_pg_name=$(fetch_column port_group name | cut -d ' ' -f1)
sb_pg_uuid=$(fetch_column port_group _uuid name=$sb_pg_name)
ports_=$(fetch_column port_group ports name=2_pg1)
ports_=$(fetch_column port_group ports name=$sb_pg_name)
ports=${ports_/ /,}
AT_CHECK([ovn-sbctl destroy port_group $sb_pg_uuid -- create port_group name=$sb_pg_name ports=$ports], [0], [ignore])

Expand Down

0 comments on commit f80bd64

Please sign in to comment.