Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | *** Settings *** |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 2 | Library OperatingSystem |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 3 | Library RequestsLibrary |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 4 | Library requests |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 5 | Library Collections |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 6 | Library String |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 7 | |
| 8 | *** Variables *** |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 9 | ${TARGETURL_NAMESPACE} https://${AAF_IP}:8100/authz/nss/org.osaaf.people |
| 10 | ${TARGETURL_PERMS} https://${AAF_IP}:8100/authz/perms/user/aaf_admin@people.osaaf.org |
| 11 | ${TARGETURL_ROLES} https://${AAF_IP}:8100/authz/roles/user/aaf_admin@people.osaaf.org |
| 12 | ${username} aaf_admin@people.osaaf.org |
| 13 | ${password} demo123456! |
| 14 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 15 | |
| 16 | *** Test Cases *** |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 17 | View Namesapce |
| 18 | [Tags] get |
| 19 | CreateSession aaf https://${AAF_IP}:8100 |
| 20 | &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json |
| 21 | ${resp}= Get Request aaf /authz/nss/org.osaaf.people headers=&{headers} |
Mariusz Wagner | 73fcc39 | 2018-10-02 12:13:14 +0200 | [diff] [blame] | 22 | Should Be Equal As Strings ${resp.status_code} 200 |
Sai Gandham | 94df0ae | 2018-10-09 16:29:54 -0500 | [diff] [blame] | 23 | log 'JSON Response Code :'${resp.text} |
| 24 | |
| 25 | View by User Permission |
| 26 | [Tags] get |
| 27 | CreateSession aaf https://${AAF_IP}:8100 |
| 28 | &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json |
| 29 | ${resp}= Get Request aaf authz/perms/user/aaf_admin@people.osaaf.org headers=&{headers} |
| 30 | Should Be Equal As Strings ${resp.status_code} 200 |
| 31 | log 'JSON Response Code :'${resp.text} |
| 32 | |
| 33 | View by User Role |
| 34 | [Tags] get |
| 35 | CreateSession aaf https://${AAF_IP}:8100 |
| 36 | &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json |
| 37 | ${resp}= Get Request aaf authz/roles/user/aaf_admin@people.osaaf.org headers=&{headers} |
| 38 | Should Be Equal As Strings ${resp.status_code} 200 |
| 39 | log 'JSON Response Code :'${resp.text} |