From 7f54130104368d99a1ae6f04a5de6c5bc14307a1 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Mon, 6 Nov 2023 17:27:58 +0200 Subject: [PATCH] added integration test for short url --- tests/01-smoke/12-cloned-lab.robot | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/01-smoke/12-cloned-lab.robot b/tests/01-smoke/12-cloned-lab.robot index 793ab8799..ac539cc3d 100644 --- a/tests/01-smoke/12-cloned-lab.robot +++ b/tests/01-smoke/12-cloned-lab.robot @@ -7,10 +7,11 @@ Suite Teardown Cleanup *** Variables *** -${lab1-url} https://github.com/hellt/clab-test-repo -${lab1-url2} https://github.com/hellt/clab-test-repo/blob/main/lab1.clab.yml -${lab2-url} https://github.com/hellt/clab-test-repo/tree/branch1 -${runtime} docker +${lab1-url} https://github.com/hellt/clab-test-repo +${lab1-shorturl} hellt/clab-test-repo +${lab1-url2} https://github.com/hellt/clab-test-repo/blob/main/lab1.clab.yml +${lab2-url} https://github.com/hellt/clab-test-repo/tree/branch1 +${runtime} docker *** Test Cases *** @@ -57,6 +58,23 @@ Test lab3 # check that node3 was filtered and not present in the lab output Should Contain ${output.stdout} clab-lab2-node1 + Cleanup + +Test lab1 with short github url + ${output} = Process.Run Process + ... sudo -E ${CLAB_BIN} --runtime ${runtime} deploy -t ${lab1-shorturl} + ... shell=True + + Log ${output.stdout} + Log ${output.stderr} + + Should Be Equal As Integers ${output.rc} 0 + + # check that node3 was filtered and not present in the lab output + Should Contain ${output.stdout} clab-lab1-node1 + + Cleanup + *** Keywords *** Cleanup