summaryrefslogtreecommitdiffstats
path: root/tests/2-nodes-vpp-bridge.yml
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-10-11 20:01:32 +0200
committerMauro Sardara <msardara@cisco.com>2022-10-12 21:49:35 +0200
commit12d21f032e9a67b327101c42481a546a48a6ac21 (patch)
tree641fce3d9f85c0d1f9da2ba8ebda2d17b0fa2eb3 /tests/2-nodes-vpp-bridge.yml
parent5ee46ef7ce250a52d85eeafc0dd27de0cd5d6f67 (diff)
test: instrument functional tests with more logs
Also: - Do not tun tests with privileged containers HICN-806 - Refactor robot test files and config.sh Currently some logs are missing from the robot output of the functional tests. This patch adds them. Ticket: HICN-805 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I9893eb356a4dd12f4bc6347b8fe02e358c9bf737
Diffstat (limited to 'tests/2-nodes-vpp-bridge.yml')
-rw-r--r--tests/2-nodes-vpp-bridge.yml37
1 files changed, 24 insertions, 13 deletions
diff --git a/tests/2-nodes-vpp-bridge.yml b/tests/2-nodes-vpp-bridge.yml
index 55349f798..8c62f6be8 100644
--- a/tests/2-nodes-vpp-bridge.yml
+++ b/tests/2-nodes-vpp-bridge.yml
@@ -2,6 +2,11 @@ version: "3"
services:
client:
container_name: ${TEST_VPP_BRIDGE}-client
+ cap_add:
+ - NET_ADMIN
+ devices:
+ - /dev/net/tun:/dev/net/tun
+ - /dev/vhost-net:/dev/vhost-net
command:
- |
if [ -d /workspace/build-dev ]; then
@@ -9,10 +14,10 @@ services:
fi
sudo ip link add br0 type bridge
- sudo ip link set eth0 master br0
- sudo ip link set eth0 up
sudo ip link set br0 up
- sudo mkdir -p /var/log/vpp
+ sudo ip link set eth0 master br0
+ sudo ip addr del ${TOPOLOGY_2_NODES_IP_ADDRESS_CLIENT}/24 dev eth0
+
sudo tee /etc/vpp/startup.conf <<EOF
cpu { main-core 1 }
plugins {
@@ -32,16 +37,16 @@ services:
unix {
startup-config /etc/vpp/client-up.txt
cli-listen /run/vpp/cli.sock
- log /var/log/vpp/vpp.log
+ log ${FORWARDER_LOG_PATH}
}
EOF
sudo tee /etc/vpp/client-up.txt <<EOF
create tap id 0 host-bridge br0
set int state tap0 up
- set int ip addr tap0 192.168.1.1/24
- set int ip addr tap0 2001::1/64
- ip route add b002::1/64 via 2001::2 tap0
+ set int ip addr tap0 ${TOPOLOGY_2_NODES_IP_ADDRESS_CLIENT}/24
+ set int ip addr tap0 ${TOPOLOGY_2_NODES_IP6_ADDRESS_CLIENT}/64
+ ip route add b002::1/64 via ${TOPOLOGY_2_NODES_IP6_ADDRESS_SERVER} tap0
EOF
sudo vpp -c /etc/vpp/startup.conf
@@ -52,6 +57,11 @@ services:
server:
container_name: ${TEST_VPP_BRIDGE}-server
+ cap_add:
+ - NET_ADMIN
+ devices:
+ - /dev/net/tun:/dev/net/tun
+ - /dev/vhost-net:/dev/vhost-net
command:
- |
if [ -d /workspace/build-dev ]; then
@@ -59,10 +69,10 @@ services:
fi
sudo ip link add br0 type bridge
- sudo ip link set eth0 master br0
- sudo ip link set eth0 up
sudo ip link set br0 up
- sudo mkdir -p /var/log/vpp
+ sudo ip link set eth0 master br0
+ sudo ip addr del ${TOPOLOGY_2_NODES_IP_ADDRESS_SERVER}/24 dev eth0
+
sudo tee /etc/vpp/startup.conf <<EOF
cpu { main-core 2 }
plugins {
@@ -81,14 +91,15 @@ services:
unix {
startup-config /etc/vpp/server-up.txt
cli-listen /run/vpp/cli.sock
- log /var/log/vpp/vpp.log
+ log ${FORWARDER_LOG_PATH}
}
EOF
+
sudo tee /etc/vpp/server-up.txt <<EOF
create tap id 0 host-bridge br0
set int state tap0 up
- set int ip addr tap0 192.168.1.12/24
- set int ip addr tap0 2001::2/64
+ set int ip addr tap0 ${TOPOLOGY_2_NODES_IP_ADDRESS_SERVER}/24
+ set int ip addr tap0 ${TOPOLOGY_2_NODES_IP6_ADDRESS_SERVER}/64
EOF
sudo vpp -c /etc/vpp/startup.conf