Skip to content

Commit

Permalink
Check ssh on VMs before start apps
Browse files Browse the repository at this point in the history
Signed-off-by: Mariia Azbeleva <[email protected]>
  • Loading branch information
azbeleva committed Sep 9, 2024
1 parent b6995e0 commit d20c748
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Robot-Framework/resources/ssh_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,11 @@ Save log

Check if ssh is ready on netvm
[Arguments] ${timeout}=30
${is_ready} = Set Variable False
FOR ${i} IN RANGE ${timeout}
${output} ${rc} Execute Command nc -zvw3 192.168.101.1 22 return_rc=True
${status} Run Keyword And Return Status
... Should Be Equal As Integers ${rc} 0
IF ${status}
${is_ready} = Set Variable True
BREAK
END
Sleep 1
Expand All @@ -308,13 +306,11 @@ Check if ssh is ready on netvm

Check if ssh is ready on vm
[Arguments] ${vm} ${timeout}=30
${is_ready} = Set Variable False
FOR ${i} IN RANGE ${timeout}
${output} ${rc} Execute Command nc -zvw3 ${vm} 22 return_rc=True
${status} Run Keyword And Return Status
... Should Be Equal As Integers ${rc} 0
IF ${status}
${is_ready} = Set Variable True
BREAK
END
Sleep 1
Expand Down
6 changes: 6 additions & 0 deletions Robot-Framework/test-suites/bat-tests/apps.robot
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Start Chromium on LenovoX1
Verify service status range=15 [email protected] expected_status=active expected_state=running
Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm ${CHROMIUM_VM}
Start XDG application Chromium
Connect to VM ${CHROMIUM_VM}
Check that the application was started chromium
Expand All @@ -42,6 +43,7 @@ Start Zathura on LenovoX1
[Tags] bat SP-T112 lenovo-x1
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm ${ZATHURA_VM}
Start XDG application 'PDF Viewer'
Connect to VM ${ZATHURA_VM}
Check that the application was started zathura
Expand All @@ -52,6 +54,7 @@ Start Gala on LenovoX1
[Tags] bat SP-T111 lenovo-x1
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm ${GALA_VM}
Start XDG application GALA
Connect to VM ${GALA_VM}
Check that the application was started gala
Expand All @@ -62,6 +65,7 @@ Start Element on LenovoX1
[Tags] bat SP-T57 lenovo-x1
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm ${COMMS_VM}
Start XDG application Element
Connect to VM ${COMMS_VM}
Check that the application was started element
Expand All @@ -72,6 +76,7 @@ Start Slack on LenovoX1
[Tags] bat SP-T191 lenovo-x1
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm ${COMMS_VM}
Start XDG application Slack
Connect to VM ${COMMS_VM}
Check that the application was started slack
Expand All @@ -82,6 +87,7 @@ Start Appflowy on LenovoX1
[Tags] bat appflowy lenovo-x1
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm appflowy-vm
Start XDG application AppFlowy
Connect to VM ${APPFLOWY_VM}
Check that the application was started appflowy
Expand Down

0 comments on commit d20c748

Please sign in to comment.