Update Robot Framework format - step 14
[integration/test.git] / csit / suites / sxp / basic / 030_Connectivity.robot
index 37302ab484c34fa2387676486c09f6c7aee741d0..3a349ee0e33c65fbbcdb16b787eef45295deaea5 100644 (file)
@@ -1,19 +1,20 @@
 *** Settings ***
-Documentation     Test suite to test connectivity problems
-Suite Setup       SxpLib.Setup SXP Environment    5
-Suite Teardown    SxpLib.Clean SXP Environment    5
-Test Setup        Clean Nodes
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           ../../../libraries/Sxp.py
-Resource          ../../../libraries/SxpLib.robot
+Documentation       Test suite to test connectivity problems
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             ../../../libraries/Sxp.py
+Resource            ../../../libraries/SxpLib.robot
+
+Suite Setup         SxpLib.Setup SXP Environment    5
+Suite Teardown      SxpLib.Clean SXP Environment    5
+Test Setup          Clean Nodes
 
-*** Variables ***
 
 *** Test Cases ***
 Version 1
     [Documentation]    Test if Version1 <=> Version1 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version1    none    version1
     BuiltIn.Log    OK without passwords
     Test Nodes    version1    default    version1
@@ -21,7 +22,7 @@ Version 1
 
 Version 2
     [Documentation]    Test if Version2 <=> Version2 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version2    none    version2
     BuiltIn.Log    OK without passwords
     Test Nodes    version2    default    version2
@@ -29,7 +30,7 @@ Version 2
 
 Version 3
     [Documentation]    Test if Version3 <=> Version3 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version3    none    version3
     BuiltIn.Log    OK without passwords
     Test Nodes    version3    default    version3
@@ -37,7 +38,7 @@ Version 3
 
 Version 4
     [Documentation]    Test if Version4 <=> Version4 can be connected
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     Test Nodes    version4    none    version4
     BuiltIn.Log    OK without passwords
     Test Nodes    version4    default    version4
@@ -45,7 +46,7 @@ Version 4
 
 Mixed Versions
     [Documentation]    Test of version negotiation proces during connecting
-    [Tags]    SXP    Connectivity
+    [Tags]    sxp    connectivity
     @{list} =    BuiltIn.Create List    version2    version3    version4
     Test Nodes    version1    none    @{list}
     Test Nodes    version1    default    @{list}
@@ -59,12 +60,13 @@ Mixed Versions
     Test Nodes    version4    none    @{list}
     Test Nodes    version4    default    @{list}
 
+
 *** Keywords ***
 Test Nodes
-    [Arguments]    ${version}    ${PASSWORD}    @{versions}
     [Documentation]    Setup connection Speaker => Listener / Listener => Speaker / Both <=> Both for specific versions
+    [Arguments]    ${version}    ${PASSWORD}    @{versions}
     FOR    ${r_version}    IN    @{versions}
-        ${cmp_version}    Lower Version    ${r_version}    ${version}
+        ${cmp_version}    Lower Version    ${r_version}    ${version}
         BuiltIn.Log    ${r_version}
         SxpLib.Add Connection    ${r_version}    listener    127.0.0.2    64999    127.0.0.1
         ...    ${PASSWORD}
@@ -84,20 +86,36 @@ Test Nodes
         BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    speaker
         ...    127.0.0.3    64999    127.0.0.2
         BuiltIn.Log    OK ${version}:listener ${r_version}:speaker
-        BuiltIn.Run Keyword If    '${version}' == 'version4' and '${r_version}' == 'version4'    Test Both    ${version}    ${r_version}    ${PASSWORD}
+        IF    '${version}' == 'version4' and '${r_version}' == 'version4'
+            Test Both    ${version}    ${r_version}    ${PASSWORD}
+        END
         Clean Nodes
     END
 
 Test Both
-    [Arguments]    ${version}    ${r_version}    ${PASSWORD}
     [Documentation]    Setup Both <=> Both connection
-    ${cmp_version}    Sxp.Lower Version    ${r_version}    ${version}
+    [Arguments]    ${version}    ${r_version}    ${PASSWORD}
+    ${cmp_version} =    Sxp.Lower Version    ${r_version}    ${version}
     SxpLib.Add Connection    ${r_version}    both    127.0.0.3    64999    127.0.0.1    ${PASSWORD}
     SxpLib.Add Connection    ${version}    both    127.0.0.1    64999    127.0.0.3    ${PASSWORD}
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    both    127.0.0.3
-    ...    64999    127.0.0.1
-    BuiltIn.Wait Until Keyword Succeeds    120x    1s    SxpLib.Verify Connection    ${cmp_version}    both    127.0.0.1
-    ...    64999    127.0.0.3
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${cmp_version}
+    ...    both
+    ...    127.0.0.3
+    ...    64999
+    ...    127.0.0.1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120x
+    ...    1s
+    ...    SxpLib.Verify Connection
+    ...    ${cmp_version}
+    ...    both
+    ...    127.0.0.1
+    ...    64999
+    ...    127.0.0.3
     BuiltIn.Log    OK ${r_version}:both ${version}:both
 
 Clean Nodes