summaryrefslogtreecommitdiffstats
path: root/robot/testsuites/aai/aai-regression-test-v14.robot
blob: 76104f8a06946e5ad0f5bf3a1a1e4f138a1f3561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
*** Settings ***
Documentation   AAI CSIT-style regression tests for CCVPN - new schema elements introduced in Casablanca release for CCVPN use case
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}
    Confirm No VPN Binding  ${vpn_id}