ApiVersion.robot 8.85 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/variables.txt
Resource    VnfLcmOperationKeywords.robot
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    DependencyLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/

*** Test Cases ***
POST API Version - Method not implemented
12
    [Documentation]    Test ID: 6.3.1.2.1
13
14
15
    ...    Test title: POST API version - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
16
    ...    Reference: clause 9.3.3.3.1 - ETSI NFV-SOL 013 v2.6.1
17
18
19
20
21
22
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
Najam UI Hassan's avatar
Najam UI Hassan committed
23
GET API Version
24
    [Documentation]    Test ID: 6.3.1.2.2
Najam UI Hassan's avatar
Najam UI Hassan committed
25
26
    ...    Test title: GET API Version
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
27
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
28
    ...    Reference: clause 9.3.3.3.2 - ETSI NFV-SOL 013 v2.6.1
29
30
31
32
33
34
35
36
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version - Method not implemented
37
    [Documentation]    Test ID:6.3.1.2.3
38
39
40
    ...    Test title: PUT API Version - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
41
    ...    Reference: clause 9.3.3.3.3 - ETSI NFV-SOL 013 v2.6.1
42
43
44
45
46
47
48
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version - Method not implemented
49
    [Documentation]    Test ID: 6.3.1.2.4
50
51
52
    ...    Test title: PATCH API Version - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
53
    ...    Reference: clause 9.3.3.3.4 - ETSI NFV-SOL 013 v2.6.1
54
55
56
57
58
59
60
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version - Method not implemented
61
    [Documentation]    Test ID: 6.3.1.2.5
62
63
64
    ...    Test title: DELETE API Version - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
65
    ...    Reference: clause 9.3.3.3.5 - ETSI NFV-SOL 013 v2.6.1
66
67
68
69
70
71
72
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405
	
POST API Version with apiMajorVerion - Method not implemented
73
    [Documentation]    Test ID: 6.3.1.2.6
74
75
76
    ...    Test title: POST API version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
77
    ...    Reference: clause 9.3.3.3.1 - ETSI NFV-SOL 013 v2.6.1
78
79
80
81
82
83
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
Najam UI Hassan's avatar
Najam UI Hassan committed
84
GET API Version with apiMajorVerion
85
    [Documentation]    Test ID: 6.3.1.2.7
Najam UI Hassan's avatar
Najam UI Hassan committed
86
87
    ...    Test title: GET API Version with apiMajorVerion
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
88
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
89
    ...    Reference: clause 9.3.3.3.2 - ETSI NFV-SOL 013 v2.6.1
90
91
92
93
94
95
96
97
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version with apiMajorVerion - Method not implemented
98
    [Documentation]    Test ID:6.3.1.2.8
99
100
101
    ...    Test title: PUT API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
102
    ...    Reference: clause 9.3.3.3.3 - ETSI NFV-SOL 013 v2.6.1
103
104
105
106
107
108
109
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version with apiMajorVerion - Method not implemented
110
    [Documentation]    Test ID: 6.3.1.2.9
111
112
113
    ...    Test title: PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
114
    ...    Reference: clause 9.3.3.3.4 - ETSI NFV-SOL 013 v2.6.1
115
116
117
118
119
120
121
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version with apiMajorVerion - Method not implemented
122
    [Documentation]    Test ID: 6.3.1.2.10
123
124
125
    ...    Test title: DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
126
    ...    Reference: clause 9.3.3.3.5 - ETSI NFV-SOL 013 v2.6.1
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405

*** Keywords ***
POST API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/v1/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/v1/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/v1/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/v1/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse} 
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/v1/api_version
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse}