blob: 93b6ce365439e1b75f49bd8cda1e0489c399dc3a [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
Sai Gandham94df0ae2018-10-09 16:29:54 -05002Library OperatingSystem
Gary Wu9abb61c2018-09-27 10:38:50 -07003Library RequestsLibrary
Sai Gandham94df0ae2018-10-09 16:29:54 -05004Library requests
Gary Wu9abb61c2018-09-27 10:38:50 -07005Library Collections
Sai Gandham94df0ae2018-10-09 16:29:54 -05006Library String
Gary Wu9abb61c2018-09-27 10:38:50 -07007
8*** Variables ***
Sai Gandham94df0ae2018-10-09 16:29:54 -05009${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 Wu9abb61c2018-09-27 10:38:50 -070015
16*** Test Cases ***
Sai Gandham94df0ae2018-10-09 16:29:54 -050017View 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 Wagner73fcc392018-10-02 12:13:14 +020022 Should Be Equal As Strings ${resp.status_code} 200
Sai Gandham94df0ae2018-10-09 16:29:54 -050023 log 'JSON Response Code :'${resp.text}
24
25View 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
33View 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}