blob: 76104f8a06946e5ad0f5bf3a1a1e4f138a1f3561 [file] [log] [blame]
Keong Lim3a5d9472019-03-04 17:15:06 +11001*** Settings ***
2Documentation AAI CSIT-style regression tests for CCVPN - new schema elements introduced in Casablanca release for CCVPN use case
Keong Limeff1eab2019-03-19 15:44:35 +11003Test Timeout 20s
Keong Lim3a5d9472019-03-04 17:15:06 +11004Resource ${EXECDIR}/robot/resources/aai/ccvpn-connectivities.robot
Keong Limeff1eab2019-03-19 15:44:35 +11005Resource ${EXECDIR}/robot/resources/aai/ccvpn-vpn-bindings.robot
Keong Lim3a5d9472019-03-04 17:15:06 +11006
7*** Variables ***
8${connectivity_id}= robot-connectivity-test-1
Keong Limeff1eab2019-03-19 15:44:35 +11009${vpn_id}= robot-vpn-test-1
10${connectivity_class}= connectivity
11${vpn_class}= vpn-binding
Keong Lim3a5d9472019-03-04 17:15:06 +110012
13*** Test Cases ***
14Connectivity test case
Keong Limeff1eab2019-03-19 15:44:35 +110015 [Tags] aai csit ccvpn connectivity
Keong Lim3a5d9472019-03-04 17:15:06 +110016 Confirm API Not Implemented Connectivity ${connectivity_id}
17 Confirm No Connectivity ${connectivity_id}
18 Create Connectivity If Not Exists ${connectivity_id}
19 Get Connectivity ${connectivity_id}
Keong Limeff1eab2019-03-19 15:44:35 +110020 [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Confirm No Connectivity ${connectivity_id}
21
22VPN Binding test case
23 [Tags] aai csit ccvpn vpn-binding
24 Confirm No VPN Binding ${vpn_id}
25 Create VPN Binding If Not Exists ${vpn_id}
26 Get VPN Binding ${vpn_id}
27 [Teardown] Run Keywords Delete VPN Binding If Exists ${vpn_id} AND Confirm No VPN Binding ${vpn_id}
28
29Connectivity to VPN Binding Relationship test case
30 [Tags] aai csit ccvpn connectivity vpn-binding relationship
Keong Lim3a5d9472019-03-04 17:15:06 +110031 Confirm No Connectivity ${connectivity_id}
Keong Limeff1eab2019-03-19 15:44:35 +110032 Confirm No VPN Binding ${vpn_id}
33 Create Connectivity If Not Exists ${connectivity_id}
34 Create VPN Binding If Not Exists ${vpn_id}
35 Get Connectivity ${connectivity_id}
36 Get VPN Binding ${vpn_id}
37 ${vpnbinding_url}= Get Valid VPN Binding URL ${vpn_id}
38 Add Connectivity Relationship ${connectivity_id} ${vpn_class} ${vpnbinding_url}
39 ${connectivity_rel}= Get Connectivity RelationshipList ${connectivity_id}
40 ${connectivity_rel_txt}= Catenate ${connectivity_rel}
41 Should Match Regexp ${connectivity_rel_txt} ${vpnbinding_url}
42 Should Match Regexp ${connectivity_rel_txt} ${vpn_class}
43 Get Connectivity With RelationshipList ${connectivity_id}
44 [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Delete VPN Binding If Exists ${vpn_id}
45
46VPN Binding Relationship to Connectivity test case
47 [Tags] aai csit ccvpn connectivity vpn-binding relationship
48 Confirm No Connectivity ${connectivity_id}
49 Confirm No VPN Binding ${vpn_id}
50 Create Connectivity If Not Exists ${connectivity_id}
51 Create VPN Binding If Not Exists ${vpn_id}
52 Get Connectivity ${connectivity_id}
53 Get VPN Binding ${vpn_id}
54 ${connectivity_url}= Get Valid Connectivity URL ${connectivity_id}
55 Add VPN Binding Relationship ${vpn_id} ${connectivity_class} ${connectivity_url}
56 ${vpn_rel}= Get VPN Binding RelationshipList ${vpn_id}
57 ${vpn_rel_txt}= Catenate ${vpn_rel}
58 Should Match Regexp ${vpn_rel_txt} ${connectivity_url}
59 Should Match Regexp ${vpn_rel_txt} ${connectivity_class}
60 Get VPN Binding With RelationshipList ${vpn_id}
61 [Teardown] Run Keywords Delete Connectivity If Exists ${connectivity_id} AND Delete VPN Binding If Exists ${vpn_id}
62
63All Teardowns test case
64 [Tags] teardowns
65 Delete Connectivity If Exists ${connectivity_id}
66 Delete VPN Binding If Exists ${vpn_id}
67 Confirm No Connectivity ${connectivity_id}
68 Confirm No VPN Binding ${vpn_id}
69