diff mbox series

[ovs-dev,4/4] ic/tests: add unit test for ic sync command

Message ID 20231220143105.916908-4-mheib@redhat.com
State Superseded
Headers show
Series [ovs-dev,1/4] IC: interconnect DBs add basic Information Flow columns | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success

Commit Message

Mohammad Heib Dec. 20, 2023, 2:31 p.m. UTC
add unit test that check validate that sync command
sync ISB properly

Signed-off-by: Mohammad Heib <mheib@redhat.com>
---
 tests/ovn-ic.at | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
index 5cc504e17..7464658ff 100644
--- a/tests/ovn-ic.at
+++ b/tests/ovn-ic.at
@@ -1297,3 +1297,25 @@  OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
 ])
+
+AT_SETUP([ovn-ic -- sync ISB status to INB])
+ovn_init_ic_db
+net_add n1
+
+ovn_start az1
+sim_add gw-az1
+as gw-az1
+
+check ovs-vsctl add-br br-phys
+ovn_az_attach az1 n1 br-phys 192.168.1.1
+check ovs-vsctl set open . external-ids:ovn-is-interconn=true
+
+ovn-ic-nbctl --wait=sb sync
+set -- $(ovn-ic-nbctl get ic_nb_global . nb_ic_cfg sb_ic_cfg)
+AS_VAR_SET([ic_nb_cfg], [$1])
+AS_VAR_SET([ic_sb_cfg], [$2])
+check test $ic_nb_cfg == $ic_sb_cfg
+
+OVN_CLEANUP_IC([az1])
+AT_CLEANUP
+])