Files
vpp-containerlab/tests/01-vpp-bird/01-e2e-lab.robot

58 lines
2.2 KiB
Plaintext

*** Settings ***
Library OperatingSystem
Resource ../ssh.robot
Resource ../common.robot
Suite Teardown Run Keyword Cleanup
*** Variables ***
${lab-name} e2e-vpp
${lab-file-name} e2e-lab/vpp.clab.yml
${runtime} docker
*** Test Cases ***
Deploy ${lab-name} lab
Log ${CURDIR}
${rc} ${output} = Run And Return Rc And Output
... ${CLAB_BIN} --runtime ${runtime} deploy -t ${CURDIR}/${lab-file-name}
Log ${output}
Should Be Equal As Integers ${rc} 0
Pause to let OSPF converge
Sleep 20s
Check BFD Adjacencies
${rc} ${output} = Run And Return Rc And Output
... ${CLAB_BIN} --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=vpp2 --cmd "birdc show bfd ses"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Match Regexp ${output} (?m)fe80::.*eth2.*Up
Should Match Regexp ${output} (?m)10\.82\.98\..*eth2.*Up
Check OSPF IPv4 Adjacency
${rc} ${output} = Run And Return Rc And Output
... ${CLAB_BIN} --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=vpp1 --cmd "birdc show ospf nei ospf4"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Match Regexp ${output} (?m)Full/PtP.*eth2
Check OSPF IPv6 Adjacency
${rc} ${output} = Run And Return Rc And Output
... ${CLAB_BIN} --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=vpp2 --cmd "birdc show ospf nei ospf6"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Match Regexp ${output} (?m)Full/PtP.*eth2
Ensure client1 can ping client2
${rc} ${output} = Run And Return Rc And Output
... ${CLAB_BIN} --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=client1 --cmd "ping -c 5 -i 0.01 10.82.98.82"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} 5 packets transmitted, 4 packets received, 20% packet loss
*** Keywords ***
Cleanup
Run ${CLAB_BIN} --runtime ${runtime} destroy -t ${CURDIR}/${lab-file-name} --cleanup