Skip to content

Commit

Permalink
added a test for port forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Jun 23, 2021
1 parent de24757 commit 7491226
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tests/01-smoke/01-basic-flow.robot
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ Verify bind mount in l1 node
Should Be Equal As Integers ${rc} 0
Should Contain ${output} Hello, containerlab

Verify port forwarding for node l2
${rc} ${output} = Run And Return Rc And Output
... curl localhost:56180
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} Thank you for using nginx

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
5 changes: 3 additions & 2 deletions tests/01-smoke/01-linux-nodes.clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ topology:
- /tmp/clab-01-test.txt:/01-test.txt
l2:
kind: linux
image: alpine:3
cmd: ash -c "sleep 9999"
image: nginx:stable-alpine
ports:
- 56180:80

links:
- endpoints: ["l1:eth1", "l2:eth1"]
Expand Down

0 comments on commit 7491226

Please sign in to comment.