summaryrefslogtreecommitdiffstats
path: root/robot/testsuites/aai
diff options
context:
space:
mode:
authorKeong Lim <keong.lim@huawei.com>2019-03-19 15:44:35 +1100
committerKeong Lim <keong.lim@huawei.com>2019-03-19 15:46:49 +1100
commiteff1eab948cd5624477e56c65db01104f87e7c96 (patch)
tree6c4b3a809e6e19d65f08a0a3a3c25b4b947ad4c1 /robot/testsuites/aai
parent2c0558d9c185638a071666e459bab50dd010f0ed (diff)
AAI-2208 Robot tests for CCVPN and relationships
Add relationship to relationship-list Add vpn-binding keywords Update connectivity keywords Update test cases to relate connectivity to vpn-binding and vice-versa Change-Id: Id23f4603f0df47e737adf481d8b6308a64936ba0 Issue-ID: AAI-2208 Signed-off-by: Keong Lim <keong.lim@huawei.com>
Diffstat (limited to 'robot/testsuites/aai')
-rw-r--r--robot/testsuites/aai/aai-regression-test-v14.robot57
1 files changed, 54 insertions, 3 deletions
diff --git a/robot/testsuites/aai/aai-regression-test-v14.robot b/robot/testsuites/aai/aai-regression-test-v14.robot
index ab43776d..76104f8a 100644
--- a/robot/testsuites/aai/aai-regression-test-v14.robot
+++ b/robot/testsuites/aai/aai-regression-test-v14.robot
@@ -1,18 +1,69 @@
*** Settings ***
Documentation AAI CSIT-style regression tests for CCVPN - new schema elements introduced in Casablanca release for CCVPN use case
-Default Tags aai csit ccvpn
-Test Timeout 10s
+Test Timeout 20s
Resource ${EXECDIR}/robot/resources/aai/ccvpn-connectivities.robot
+Resource ${EXECDIR}/robot/resources/aai/ccvpn-vpn-bindings.robot
*** Variables ***
${connectivity_id}= robot-connectivity-test-1
+${vpn_id}= robot-vpn-test-1
+${connectivity_class}= connectivity
+${vpn_class}= vpn-binding
*** Test Cases ***
Connectivity test case
+ [Tags] aai csit ccvpn connectivity
Confirm API Not Implemented Connectivity ${connectivity_id}
Confirm No Connectivity ${connectivity_id}
Create Connectivity If Not Exists ${connectivity_id}
Get Connectivity ${connectivity_id}
+ [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Confirm No Connectivity ${connectivity_id}
+
+VPN Binding test case
+ [Tags] aai csit ccvpn vpn-binding
+ Confirm No VPN Binding ${vpn_id}
+ Create VPN Binding If Not Exists ${vpn_id}
+ Get VPN Binding ${vpn_id}
+ [Teardown] Run Keywords Delete VPN Binding If Exists ${vpn_id} AND Confirm No VPN Binding ${vpn_id}
+
+Connectivity to VPN Binding Relationship test case
+ [Tags] aai csit ccvpn connectivity vpn-binding relationship
+ Confirm No Connectivity ${connectivity_id}
+ Confirm No VPN Binding ${vpn_id}
+ Create Connectivity If Not Exists ${connectivity_id}
+ Create VPN Binding If Not Exists ${vpn_id}
+ Get Connectivity ${connectivity_id}
+ Get VPN Binding ${vpn_id}
+ ${vpnbinding_url}= Get Valid VPN Binding URL ${vpn_id}
+ Add Connectivity Relationship ${connectivity_id} ${vpn_class} ${vpnbinding_url}
+ ${connectivity_rel}= Get Connectivity RelationshipList ${connectivity_id}
+ ${connectivity_rel_txt}= Catenate ${connectivity_rel}
+ Should Match Regexp ${connectivity_rel_txt} ${vpnbinding_url}
+ Should Match Regexp ${connectivity_rel_txt} ${vpn_class}
+ Get Connectivity With RelationshipList ${connectivity_id}
+ [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Delete VPN Binding If Exists ${vpn_id}
+
+VPN Binding Relationship to Connectivity test case
+ [Tags] aai csit ccvpn connectivity vpn-binding relationship
+ Confirm No Connectivity ${connectivity_id}
+ Confirm No VPN Binding ${vpn_id}
+ Create Connectivity If Not Exists ${connectivity_id}
+ Create VPN Binding If Not Exists ${vpn_id}
+ Get Connectivity ${connectivity_id}
+ Get VPN Binding ${vpn_id}
+ ${connectivity_url}= Get Valid Connectivity URL ${connectivity_id}
+ Add VPN Binding Relationship ${vpn_id} ${connectivity_class} ${connectivity_url}
+ ${vpn_rel}= Get VPN Binding RelationshipList ${vpn_id}
+ ${vpn_rel_txt}= Catenate ${vpn_rel}
+ Should Match Regexp ${vpn_rel_txt} ${connectivity_url}
+ Should Match Regexp ${vpn_rel_txt} ${connectivity_class}
+ Get VPN Binding With RelationshipList ${vpn_id}
+ [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Delete VPN Binding If Exists ${vpn_id}
+
+All Teardowns test case
+ [Tags] teardowns
Delete Connectivity If Exists ${connectivity_id}
+ Delete VPN Binding If Exists ${vpn_id}
Confirm No Connectivity ${connectivity_id}
- [Teardown] Delete Connectivity If Exists ${connectivity_id}
+ Confirm No VPN Binding ${vpn_id}
+