eb50c1455c7b61be13450a6be17de8f7d6abc428
[integration/test.git] / test / csit / suites / aaa / idmlite / idmliteCrud.robot
1 *** Settings ***
2 Documentation     AAA IdmLite System Tests
3 Suite Setup       Delete All Sessions
4 Suite Teardown    Delete All Sessions
5 Library           Collections
6 Library           OperatingSystem
7 Library           String
8 Library           RequestsLibrary
9 Library           RequestsLibrary
10 Library           ../../../libraries/Common.py
11 Resource          ../../../libraries/Utils.robot
12 Variables         ../../../variables/Variables.py
13 Resource          ../../../libraries/AAAKeywords.robot
14
15 *** Variables ***
16 ${idmurl}    /auth/v1
17
18 *** Test Cases ***
19 Get Users
20     [Documentation]    Get Users from H2 Database
21     ${resp}=    Get User From IDM DB
22     Log    ${resp.content}
23     Should Not Be Empty    ${resp.content}
24
25 Create User and Verify
26     ${resp}=    Create User    {"name":"testuser","description":"robot test user","enabled":"true","email":"user1@gmail.com","password":"foobar"}
27     ${userId}=    Get Json Value    ${resp.content}    /userid
28     ${resp}=    Get User From IDM DB    ${userId}
29     ${name}=    Get Json Value    ${resp.content}    /name
30     ${email}=    Get Json Value    ${resp.content}    /email
31     ${description}=    Get Json Value    ${resp.content}   /description
32     Should Be Equal As Strings    ${name}    "testuser"
33     Should Be Equal As Strings    ${email}    "user1@gmail.com"
34     Should Be Equal As Strings    ${description}    "robot test user"