blob: 5527cf4a3629bb2ba0d8c9b0ec218e2756375ae3 [file] [log] [blame]
manashsarma677408d2021-06-22 07:35:33 -05001*** Settings ***
2Documentation This suite is to test service user functionality via Redfish.
3
manashsarma94c97d82021-07-09 05:25:45 -05004Resource ../../lib/connection_client.robot
5Resource ../../lib/openbmc_ffdc.robot
6Resource ../../lib/bmc_redfish_utils.robot
manashsarma677408d2021-06-22 07:35:33 -05007
8Suite Setup Suite Setup Execution
9Suite Teardown Redfish.Logout
10Test Teardown FFDC On Test Case Fail
11
12
13*** Test Cases ***
14
15Verify service user availability
16 [Documentation] Verify service user avalability.
17
18 # Verify that service user has administrator privilege.
19 ${role_config}= Redfish_Utils.Get Attribute
20 ... /redfish/v1/AccountService/Accounts/service RoleId
21
22 Should Be Equal Administrator ${role_config}
23
24
manashsarma94c97d82021-07-09 05:25:45 -050025Verify Creating User With Service Username
26 [Documentation] Verify that user with service username can not be created.
27
28 ${payload}= Create Dictionary
29 ... UserName=service Password=TestPwd1 RoleId=Operator Enabled=${True}
30 Redfish.Post /redfish/v1/AccountService/Accounts/ body=&{payload}
31 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
32
manashsarma677408d2021-06-22 07:35:33 -050033*** Keywords ***
34
35Suite Setup Execution
36 [Documentation] Do suite setup tasks.
37
38 Redfish.Login