Skip to content

Commit

Permalink
basic test added curl timelimit and env test
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Jul 1, 2021
1 parent 01f558e commit 79c306a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tests/01-smoke/01-basic-flow.robot
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Verify bind mount in l1 node

Verify port forwarding for node l2
${rc} ${output} = Run And Return Rc And Output
... curl localhost:56180
... curl -m 3 localhost:56180
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} Thank you for using nginx
Expand All @@ -100,6 +100,13 @@ Verify static mgmt addressing for l2
Log ${ipv6}
Should Be Equal As Strings ${ipv6} ${n2-ipv6}

Verify on l1 environment variable MYVAR is set
${rc} ${output} = Run And Return Rc And Output
... ${runtime-cli-exec-cmd} clab-2-linux-nodes-l1 sh -c "echo \\$MYVAR"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} MYVAR is SET

Destroy ${lab-name} lab
${rc} ${output} = Run And Return Rc And Output
... sudo containerlab --runtime ${runtime} destroy -t ${CURDIR}/01-linux-nodes.clab.yml --cleanup
Expand Down
4 changes: 3 additions & 1 deletion tests/01-smoke/01-linux-nodes.clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ topology:
l1:
kind: linux
image: alpine:3
cmd: ash -c "sleep 9999"
cmd: ash -c "echo $MYVAR > /tmp/var && sleep 9999"
binds:
- /tmp/clab-01-test.txt:/01-test.txt
env:
MYVAR: MYVAR is SET
l2:
kind: linux
image: nginx:stable-alpine
Expand Down

0 comments on commit 79c306a

Please sign in to comment.