Set REST GET and POST timeout
By default the GET and POST connection timeout is set to None
which means it'll wait until the connection is closed. Now with
this timeout the session will hang up post 10 seconds and free
up the session for other test request to come in.
Piggy back the REST restart disabling via skip list in this
commit
Resolves openbmc/openbmc-test-automation#165
Change-Id: Iafcbff892e7c5677a46fb096e21eca6ad5a279f0
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index 3d7a36c..1cd1439 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -64,7 +64,7 @@
${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
Log Request method=Get base_uri=${base_uri} args=&{kwargs}
Initialize OpenBMC
- ${ret}= Get Request openbmc ${base_uri} &{kwargs}
+ ${ret}= Get Request openbmc ${base_uri} &{kwargs} timeout=10
Log Response ${ret}
[Return] ${ret}
@@ -75,7 +75,7 @@
set to dictionary ${kwargs} headers ${headers}
Log Request method=Post base_uri=${base_uri} args=&{kwargs}
Initialize OpenBMC
- ${ret}= Post Request openbmc ${base_uri} &{kwargs}
+ ${ret}= Post Request openbmc ${base_uri} &{kwargs} timeout=10
Log Response ${ret}
[Return] ${ret}
@@ -86,7 +86,7 @@
set to dictionary ${kwargs} headers ${headers}
Log Request method=Put base_uri=${base_uri} args=&{kwargs}
Initialize OpenBMC
- ${ret}= Put Request openbmc ${base_uri} &{kwargs}
+ ${ret}= Put Request openbmc ${base_uri} &{kwargs} timeout=10
Log Response ${ret}
[Return] ${ret}
@@ -95,7 +95,7 @@
${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
Log Request method=Delete base_uri=${base_uri} args=&{kwargs}
Initialize OpenBMC
- ${ret}= Put Request openbmc ${base_uri} &{kwargs}
+ ${ret}= Put Request openbmc ${base_uri} &{kwargs} timeout=10
Log Response ${ret}
[Return] ${ret}
diff --git a/test_lists/skip_test b/test_lists/skip_test
index 2ab9588..c075805 100644
--- a/test_lists/skip_test
+++ b/test_lists/skip_test
@@ -23,6 +23,7 @@
-e Validate_Beep_LEDs_Test_Cases
#https://github.com/openbmc/openbmc-test-automation/issues/130
-e Test_OpenBMC_Services_Autorestart_Policy
+-e Test_Restart_Policy_for_openbmc_service
#https://github.com/openbmc/openbmc-test-automation/issues/90
-e Verify_System_VPD_Properties
#https://github.com/openbmc/openbmc/issues/93
diff --git a/tests/test_openbmc_service_restart_policy.robot b/tests/test_openbmc_service_restart_policy.robot
index b1cc91d..6062526 100644
--- a/tests/test_openbmc_service_restart_policy.robot
+++ b/tests/test_openbmc_service_restart_policy.robot
@@ -62,6 +62,7 @@
Test Restart Policy for openbmc service
[Documentation] This testcase will kill the service and make sure it
... does restart after that
+ [Tags] Test_Restart_Policy_for_openbmc_service
${MainPID}= Execute Restart Policy Command
... systemctl -p MainPID show phosphor-settings.service| cut -d = -f2