-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graph drawio: Pull strategy and Interactive mode support (#2291)
* Pull strategy and Interactive mode support * update go.mod and go.sum * add smoke test for drawio graph generation * added smoke test for graph drawio * make non-interactive env (ci/cd) happy * using 03-linux-nodes-to-bridge-and-host as lab
- Loading branch information
Showing
5 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
*** Settings *** | ||
Documentation This test ensures that the `clab graph` command generates a diagram successfully, | ||
... and that the code handling the Docker image updates works as expected. | ||
Library OperatingSystem | ||
Library Process | ||
Resource ../common.robot | ||
|
||
Suite Setup Setup | ||
Suite Teardown Teardown | ||
|
||
*** Variables *** | ||
${lab-file} 03-linux-nodes-to-bridge-and-host.clab.yml | ||
${lab-name} graph-test | ||
${runtime} docker | ||
${diagram-file} 03-linux-nodes-to-bridge-and-host.clab.drawio | ||
|
||
*** Test Cases *** | ||
Generate Diagram for ${lab-name} Lab | ||
[Documentation] This test runs `clab graph` to generate a diagram and verifies success. | ||
# Run the 'clab graph' command to generate the diagram | ||
${output}= Run Process sudo -E ${CLAB_BIN} graph -t ${CURDIR}/${lab-file} --drawio --drawio-args\=--theme nokia_modern_dark | ||
... shell=True stdout=PIPE stderr=PIPE | ||
|
||
Log ${output.stdout} | ||
Log ${output.stderr} | ||
|
||
# Ensure the command completed successfully | ||
Should Be Equal As Integers ${output.rc} 0 | ||
|
||
# Check for expected output messages | ||
Should Contain ${output.stdout} Diagram created successfully. | ||
|
||
# Check that the diagram file was created | ||
File Should Exist ${CURDIR}/${diagram-file} | ||
|
||
*** Keywords *** | ||
Setup | ||
# Skip this test suite for podman for now | ||
Skip If '${runtime}' == 'podman' | ||
|
||
Teardown | ||
# Clean up by destroying the lab and removing the diagram file | ||
Remove File ${CURDIR}/${diagram-file} |