X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fsxp%2Fbasic%2F020_Restconf_CRUD.robot;h=a747f67d54ee2bdaf49e89dbda6855df10a9f190;hb=c9c2accb731b954f8a5dde7daac32b7061d4e3db;hp=52bcbdeb2f30eb29bf063afa9544fbd1fcd64bb5;hpb=ce2fd5ce86f724715c839ebe0878eb0e7806239b;p=integration%2Ftest.git diff --git a/csit/suites/sxp/basic/020_Restconf_CRUD.robot b/csit/suites/sxp/basic/020_Restconf_CRUD.robot index 52bcbdeb2f..a747f67d54 100644 --- a/csit/suites/sxp/basic/020_Restconf_CRUD.robot +++ b/csit/suites/sxp/basic/020_Restconf_CRUD.robot @@ -2,70 +2,67 @@ Documentation Test suite to verify CRUD operations Suite Setup Setup SXP Environment Suite Teardown Clean SXP Environment -Test Setup Clean Node +Test Teardown Clean Node Library RequestsLibrary Library ../../../libraries/Sxp.py Resource ../../../libraries/SxpLib.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../variables/Variables.py *** Variables *** *** Test Cases *** -Test Add Binding +Test Add Bindings [Documentation] Test if bindings are added to Master DB - ${resp} Get Bindings Master Database - Add Binding 5230 1.1.1.1/32 - ${resp} Get Bindings Master Database - Should Contain Binding ${resp} 5230 1.1.1.1/32 - Add Binding 30 2001:0:0:0:0:0:0:0/128 - ${resp} Get Bindings Master Database - Should Contain Binding ${resp} 30 2001:0:0:0:0:0:0:0/128 + [Tags] Restconf CRUD SXP + ${resp} Get Bindings + Add Bindings 5230 1.1.1.1/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 5230 1.1.1.1/32 + Add Bindings 30 2001:0:0:0:0:0:0:0/128 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 30 2001:0:0:0:0:0:0:0/128 + +Test Update Bindings + [Documentation] Test if bindings can be updated to different SGT values by new incoming bindings for the same IP prefix + [Tags] Restconf CRUD SXP + Add Bindings 30 1.1.1.10/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 30 1.1.1.10/32 + Sleep 1s New binding must be at least 1s newer + Add Bindings 40 1.1.1.10/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Not Contain 30 1.1.1.10/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 40 1.1.1.10/32 Test Add Connection [Documentation] Test if connections are added to Node + [Tags] Restconf CRUD SXP Add Connection version4 speaker 10.1.0.0 60000 - ${resp} Get Connections - Should Contain Connection ${resp} 10.1.0.0 60000 speaker version4 + Wait Until Keyword Succeeds 3x 250ms Connections Should Contain 10.1.0.0 60000 speaker + ... version4 Add Connection version1 listener 105.12.0.50 64000 - ${resp} Get Connections - Should Contain Connection ${resp} 105.12.0.50 64000 listener version1 + Wait Until Keyword Succeeds 3x 250ms Connections Should Contain 105.12.0.50 64000 listener + ... version1 Test Delete Binding [Documentation] Test if bindings are deleted from Master DB - Add Binding 52301 12.1.1.1/32 - ${resp} Get Bindings Master Database - Should Contain Binding ${resp} 52301 12.1.1.1/32 - Delete Binding 2631 12.1.1.1/32 - ${resp} Get Bindings Master Database - Should Contain Binding ${resp} 52301 12.1.1.1/32 + [Tags] Restconf CRUD SXP + Add Bindings 52301 12.1.1.1/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 52301 12.1.1.1/32 + Run Keyword And Expect Error * Delete Binding 2631 12.1.1.1/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Contain 52301 12.1.1.1/32 Delete Binding 52301 12.1.1.1/32 - ${resp} Get Bindings Master Database - Should Not Contain Binding ${resp} 52301 12.1.1.1/32 + Wait Until Keyword Succeeds 3x 250ms Bindings Should Not Contain 52301 12.1.1.1/32 Test Delete Connection [Documentation] Test if conncetions are removed from Node + [Tags] Restconf CRUD SXP Add Connection version4 speaker 127.1.0.30 60000 - ${resp} Get Connections - Should Contain Connection ${resp} 127.1.0.30 60000 speaker version4 - Delete Connections 127.1.0.30 65000 - ${resp} Get Connections - Should Contain Connection ${resp} 127.1.0.30 60000 speaker version4 + Wait Until Keyword Succeeds 3x 250ms Connections Should Contain 127.1.0.30 60000 speaker + ... version4 + Run Keyword And Expect Error * Delete Connections 127.1.0.30 65000 + Wait Until Keyword Succeeds 3x 250ms Connections Should Contain 127.1.0.30 60000 speaker + ... version4 Delete Connections 127.1.0.30 60000 - ${resp} Get Connections - Should Not Contain Connection ${resp} 127.1.0.30 60000 speaker version4 - -Test Update Binding - [Documentation] Test if bindings can be updated to different values - Add Binding 3230 1.1.1.10/32 - ${resp} Get Bindings Master Database - Should Contain Binding ${resp} 3230 1.1.1.10/32 - Update Binding 3230 1.1.1.10/32 623 10.10.10.10/32 - ${resp} Get Bindings Master Database - Should Not Contain Binding ${resp} 3230 1.1.1.10/32 - Should Contain Binding ${resp} 623 10.10.10.10/32 + Wait Until Keyword Succeeds 3x 250ms Connections Should Not Contain 127.1.0.30 60000 speaker + ... version4 *** Keywords *** Clean Node - Clean Connections 127.0.0.1 Clean Bindings 127.0.0.1 + Clean Connections 127.0.0.1