Restore boot policy setting to default

Test leaves the boot setting to CDROM for Host OS boot. So the OS
fail to auto boot from petitboot.

Resolves openbmc/openbmc-test-automation#310

Change-Id: I268dc03193b4652a5b937856b8f6444c5111360f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_bootpolicy.robot b/tests/test_bootpolicy.robot
index 19d211d..35c4964 100644
--- a/tests/test_bootpolicy.robot
+++ b/tests/test_bootpolicy.robot
@@ -8,9 +8,9 @@
 Resource           ../lib/openbmc_ffdc.robot
 
 Suite Setup        Open Connection And Log In
-Suite Teardown     Close All Connections
 Test Setup         Initialize DBUS cmd   "boot_policy"
 Test Teardown      FFDC On Test Case Fail
+Suite Teardown     Restore Boot Settings
 
 *** Variables ***
 ${HOST_SETTINGS}    ${SETTINGS_URI}host0
@@ -148,5 +148,8 @@
     ${valueDict} =   create dictionary   data=${bootDevice}
     Write Attribute    ${HOST_SETTINGS}   boot_flags   data=${valueDict}
 
-
-
+Restore Boot Settings
+    [Documentation]  Restore default settings.
+    Set Boot Policy  ONETIME
+    Set Boot Device  default
+    Close All Connections