aboutsummaryrefslogtreecommitdiffstats
path: root/tests/aaf/aafapi/aafapi.robot
blob: 93b6ce365439e1b75f49bd8cda1e0489c399dc3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
*** Settings ***
Library           OperatingSystem
Library           RequestsLibrary
Library           requests
Library           Collections
Library           String

*** Variables ***
${TARGETURL_NAMESPACE}     https://${AAF_IP}:8100/authz/nss/org.osaaf.people
${TARGETURL_PERMS}         https://${AAF_IP}:8100/authz/perms/user/aaf_admin@people.osaaf.org
${TARGETURL_ROLES}         https://${AAF_IP}:8100/authz/roles/user/aaf_admin@people.osaaf.org
${username}               aaf_admin@people.osaaf.org
${password}               demo123456!


*** Test Cases ***
View Namesapce
    [Tags]    get
    CreateSession    aaf    https://${AAF_IP}:8100
    &{headers}=  Create Dictionary    Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE=    Content-Type=application/json    Accept=application/json
    ${resp}=    Get Request    aaf    /authz/nss/org.osaaf.people    headers=&{headers}
    Should Be Equal As Strings    ${resp.status_code}    200
    log                           'JSON Response Code :'${resp.text}  
  
View by User Permission 
    [Tags]    get
    CreateSession    aaf    https://${AAF_IP}:8100
    &{headers}=  Create Dictionary    Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE=    Content-Type=application/json    Accept=application/json
    ${resp}=    Get Request    aaf    authz/perms/user/aaf_admin@people.osaaf.org    headers=&{headers}
    Should Be Equal As Strings    ${resp.status_code}    200
    log                           'JSON Response Code :'${resp.text}  
  
View by User Role 
    [Tags]    get
    CreateSession    aaf    https://${AAF_IP}:8100
    &{headers}=  Create Dictionary    Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE=    Content-Type=application/json    Accept=application/json
    ${resp}=    Get Request    aaf    authz/roles/user/aaf_admin@people.osaaf.org    headers=&{headers}
    Should Be Equal As Strings    ${resp.status_code}    200
    log                           'JSON Response Code :'${resp.text}