aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ovn.sh
diff options
context:
space:
mode:
authorMartin Hiner <m.hiner@partner.samsung.com>2022-11-21 18:38:57 +0100
committerMartin Hiner <m.hiner@partner.samsung.com>2023-04-28 16:16:55 +0200
commit53e8b80ed36a9193627862427fa224ed38375d3a (patch)
tree14463dda4a87452345c37a1a5252d50db057bc12 /tests/test-ovn.sh
parent92ddbdfbc190ec430f5527fcf867efec97e455b4 (diff)
downloadkolla-ansible-53e8b80ed36a9193627862427fa224ed38375d3a.tar.gz
kolla-ansible-53e8b80ed36a9193627862427fa224ed38375d3a.zip
Add container engine option to scripts
This patch add a way to choose container engine inside tool and test scripts. This is in preparation for Podman introduction but still leaves Docker as default container engine. Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: I395d2bdb0dfb4b325b6ad197c8893c8a0f768324
Diffstat (limited to 'tests/test-ovn.sh')
-rwxr-xr-xtests/test-ovn.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test-ovn.sh b/tests/test-ovn.sh
index 9ed190619..7159c804b 100755
--- a/tests/test-ovn.sh
+++ b/tests/test-ovn.sh
@@ -15,18 +15,18 @@ function test_ovn {
# List OVN NB/SB entries
echo "OVN NB DB entries:"
- sudo docker exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" show
+ sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" show
echo "OVN SB DB entries:"
- sudo docker exec ovn_northd ovn-sbctl --db "$ovn_sb_connection" show
+ sudo ${container_engine} exec ovn_northd ovn-sbctl --db "$ovn_sb_connection" show
# Test OVSDB cluster state
if [[ $BASE_DISTRO =~ ^(debian|ubuntu)$ ]]; then
- OVNNB_STATUS=$(sudo docker exec ovn_nb_db ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl cluster/status OVN_Northbound)
- OVNSB_STATUS=$(sudo docker exec ovn_sb_db ovs-appctl -t /var/run/openvswitch/ovnsb_db.ctl cluster/status OVN_Southbound)
+ OVNNB_STATUS=$(sudo ${container_engine} exec ovn_nb_db ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl cluster/status OVN_Northbound)
+ OVNSB_STATUS=$(sudo ${container_engine} exec ovn_sb_db ovs-appctl -t /var/run/openvswitch/ovnsb_db.ctl cluster/status OVN_Southbound)
else
- OVNNB_STATUS=$(sudo docker exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound)
- OVNSB_STATUS=$(sudo docker exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound)
+ OVNNB_STATUS=$(sudo ${container_engine} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound)
+ OVNSB_STATUS=$(sudo ${container_engine} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound)
fi
if [[ $(grep -o "at tcp:" <<< ${OVNNB_STATUS} | wc -l) != "3" ]]; then
@@ -84,9 +84,9 @@ function test_octavia {
openstack floating ip set $lb_fip --port $lb_port_id
echo "OVN NB entries for LB:"
- sudo docker exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list load_balancer
+ sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list load_balancer
echo "OVN NB entries for NAT:"
- sudo docker exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list nat
+ sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list nat
echo "Attempt to access the load balanced HTTP server."
attempts=12
@@ -133,5 +133,5 @@ function test_ovn_setup {
}
-
+container_engine=${1:-docker}
test_ovn_setup