REST Login and Logout test
Resolves openbmc/openbmc-test-automation#567
Change-Id: I03a17ad853fb4264f9131380471ec920cd9ba155
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_rest_interfaces.robot b/tests/test_rest_interfaces.robot
index f1ceded..5e1fc37 100644
--- a/tests/test_rest_interfaces.robot
+++ b/tests/test_rest_interfaces.robot
@@ -11,6 +11,27 @@
*** Test Cases ***
+REST Login Session To BMC
+ [Documentation] Test REST session log-in.
+ [Tags] REST_Login_Session_To_BMC
+
+ Initialize OpenBMC
+ # Raw GET REST operation to verify session is established.
+ ${resp}= Get Request openbmc /xyz/openbmc_project/
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
+
+
+REST Logout Session To BMC
+ [Documentation] Test REST session log-out.
+ [Tags] REST_Logout_Session_To_BMC
+
+ Initialize OpenBMC
+ Log Out OpenBMC
+ # Raw GET REST operation to verify session is logout.
+ ${resp}= Get Request openbmc /xyz/openbmc_project/
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_UNAUTHORIZED}
+
+
Get Response Codes
[Documentation] REST "Get" response status test.
#--------------------------------------------------------------------