Skip to content

Commit

Permalink
added tests for gen command
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Jun 6, 2021
1 parent 70afe1f commit 8875772
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/01-smoke/04-generate.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*** Settings ***
Library OperatingSystem
Suite Teardown Cleanup

*** Variables ***
${lab-name} 3-clab-gen

*** Test Cases ***
Deploy ${lab-name} lab with generate command
${rc} ${output} = Run And Return Rc And Output
... sudo containerlab generate --name ${lab-name} --kind linux --image alpine:latest --nodes 2,1,1 --deploy
Log ${output}
Should Be Equal As Integers ${rc} 0

Verify nodes
${rc} ${output} = Run And Return Rc And Output
... sudo containerlab inspect --name ${lab-name}
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} clab-${lab-name}-node1-1
Should Contain ${output} clab-${lab-name}-node1-2
Should Contain ${output} clab-${lab-name}-node2-1
Should Contain ${output} clab-${lab-name}-node3-1

*** Keywords ***
Cleanup
Run sudo containerlab destroy -t ${CURDIR}/${lab-name}.clab.yml --cleanup

0 comments on commit 8875772

Please sign in to comment.