diff mbox series

[ovs-dev,v4,2/9] tests: Stop using non-existent requested-chassis

Message ID 20210903192748.1408062-3-frode.nordahl@canonical.com
State Changes Requested
Headers show
Series Introduce infrastructure for plugging providers | expand

Checks

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 fail github build: failed

Commit Message

Frode Nordahl Sept. 3, 2021, 7:27 p.m. UTC
A couple of tests refers to non-existent chassis to validate that
the ovn-controller would release ports that otherwise was destined
for it when requested-chassis points somewhere else.

With upcoming changes to have the ovn-controller use the new
Port_Binding:requested_chassis column maintained by northd instead
of processing the options itself, referring to a non-existant
chassis will no longer work as the tests expect.

With this patch we instead add a throw-away chassis to the
simulation and point the requested-chassis option at that chassis.

Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
---
 tests/ovn.at | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 5104a6895..2914018e8 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -9434,6 +9434,11 @@  ovn-nbctl lsp-add bar bar3 \
 # Create two hypervisor and create OVS ports corresponding to logical ports.
 net_add n1
 
+sim_add hv-foo
+as hv-foo
+ovs-vsctl add-br br-phys
+ovn_attach n1 br-phys 192.168.0.253
+
 sim_add hv1
 as hv1
 ovs-vsctl add-br br-phys
@@ -9603,7 +9608,7 @@  as hv1 ovs-appctl netdev-dummy/receive vm1 $packet
 OVN_CHECK_PACKETS([hv1/vm1-tx.pcap], [expected1])
 
 # Test binding of parent and container ports.
-ovn-nbctl lsp-set-options vm1 requested-chassis=foo
+ovn-nbctl lsp-set-options vm1 requested-chassis=hv-foo
 
 OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up vm1)])
 OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up foo1)])
@@ -13454,6 +13459,10 @@  ovn-nbctl ls-add ls0
 ovn-nbctl lsp-add ls0 lsp0
 
 net_add n1
+sim_add hv-foo
+as hv-foo
+ovs-vsctl add-br br-phys
+ovn_attach n1 br-phys 192.168.0.10
 sim_add hv1
 as hv1
 ovs-vsctl add-br br-phys
@@ -13473,7 +13482,7 @@  wait_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0
 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=0 | grep in_port=1], [0], [ignore])
 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore])
 
-check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=non-existant-chassis
+check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=hv-foo
 OVS_WAIT_UNTIL([test 1 = $(grep -c "Releasing lport lsp0 from this chassis" hv1/ovn-controller.log)])
 check ovn-nbctl --wait=hv sync
 wait_column '' Port_Binding chasssi logical_port=lsp0