blob: 0f2267be73f089e0baa8d49f448919333523967d [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
Mariusz Wagner73fcc392018-10-02 12:13:14 +02002Suite Setup Run keywords Created header Created session
Gary Wu9abb61c2018-09-27 10:38:50 -07003Library RequestsLibrary
Gary Wu9abb61c2018-09-27 10:38:50 -07004Library Collections
Gary Wu9abb61c2018-09-27 10:38:50 -07005
6*** Variables ***
Gary Wu9abb61c2018-09-27 10:38:50 -07007
8*** Test Cases ***
Mariusz Wagner73fcc392018-10-02 12:13:14 +02009View information from app
10 [Template] Get template
11 /authz/nss/org.openecomp
12 authz/perms/user/dgl@openecomp.org
13 authz/roles/user/dgl@openecomp.org
Gary Wu9abb61c2018-09-27 10:38:50 -070014
Mariusz Wagner73fcc392018-10-02 12:13:14 +020015Cleanup Namespace ( 424 Response - Delete dependencies and try again )
Gary Wu9abb61c2018-09-27 10:38:50 -070016 [Tags] delete
Mariusz Wagner73fcc392018-10-02 12:13:14 +020017 ${resp}= Delete Request ${suite_aaf_session} authz/ns/org.openecomp.dmaapBC headers=${suite_headers}
Gary Wu9abb61c2018-09-27 10:38:50 -070018 Should Be Equal As Strings ${resp.status_code} 424
19 log 'JSON Response Code :'${resp.text}
Mariusz Wagner73fcc392018-10-02 12:13:14 +020020
21Add information to app
22 [Template] Post template
23 authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org 403
24 authz/perms/user/m99751@dmaapBC.openecomp.org 406
25
26*** Keywords ***
27Created session
28 Create Session aaf_session http://${AAF_IP}:8101
29 Set Suite Variable ${suite_aaf_session} aaf_session
30
31Created header
32 ${headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
33 Set Suite Variable ${suite_headers} ${headers}
34
35Get template
36 [Arguments] ${topic}
37 ${resp}= Get Request ${suite_aaf_session} ${topic} headers=${suite_headers}
38 Should Be Equal As Strings ${resp.status_code} 200
39 log 'JSON Response Code :'${resp.text}
40
41Post template
42 [Arguments] ${topic} ${response_status_code}
43 ${resp}= Post Request ${suite_aaf_session} ${topic} headers=${suite_headers}
44 Should Be Equal As Strings ${resp.status_code} ${response_status_code}
45 log 'JSON Response Code :'${resp.text}