Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | *** Settings *** |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 2 | Suite Setup Run keywords Created header Created session |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 3 | Library RequestsLibrary |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 4 | Library Collections |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 5 | |
| 6 | *** Variables *** |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 7 | |
| 8 | *** Test Cases *** |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 9 | View 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 Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 14 | |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 15 | Cleanup Namespace ( 424 Response - Delete dependencies and try again ) |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 16 | [Tags] delete |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 17 | ${resp}= Delete Request ${suite_aaf_session} authz/ns/org.openecomp.dmaapBC headers=${suite_headers} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 18 | Should Be Equal As Strings ${resp.status_code} 424 |
| 19 | log 'JSON Response Code :'${resp.text} |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 20 | |
| 21 | Add 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 *** |
| 27 | Created session |
| 28 | Create Session aaf_session http://${AAF_IP}:8101 |
| 29 | Set Suite Variable ${suite_aaf_session} aaf_session |
| 30 | |
| 31 | Created header |
| 32 | ${headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json |
| 33 | Set Suite Variable ${suite_headers} ${headers} |
| 34 | |
| 35 | Get 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 | |
| 41 | Post 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} |