Enable Qemu test execution
This change addresses the following
- user input SSH and HTTPS port
- consolidate SSH connections in lib
- fix obsolete codes
- update README instructions
Resolves openbmc/openbmc-test-automation#41
Change-Id: I06dd132fb745ebbf035cb0fc583b46542448d126
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_eventlog.robot b/tests/test_eventlog.robot
index c294ae5..b71e330 100644
--- a/tests/test_eventlog.robot
+++ b/tests/test_eventlog.robot
@@ -1,14 +1,15 @@
*** Settings ***
-Documentation This suite is used for testing the error logging
-... capability from the host
+Documentation This suite is used for testing the error logging
+... capability from the host
-Resource ../lib/rest_client.robot
-Resource ../lib/utils.robot
+Resource ../lib/rest_client.robot
+Resource ../lib/utils.robot
+Resource ../lib/connection_client.robot
+Library Collections
-Library BuiltIn
-Library Collections
-Library SSHLibrary
+Suite Setup Open Connection And Log In
+Suite Teardown Close All Connections
*** Variables ***
&{NIL} data=@{EMPTY}
@@ -105,7 +106,6 @@
${json} = to json ${resp.content}
${logs_pre_restart}= set variable ${json['data']}
- Open Connection And Log In
${uptime}= Execute Command systemctl restart obmc-phosphor-event.service
Sleep ${10}
@@ -120,7 +120,6 @@
[Tags] CI
${uri}= create a test log
- Open Connection And Log In
${uptime}= Execute Command systemctl restart obmc-phosphor-event.service
Sleep ${10}
@@ -132,7 +131,6 @@
[Documentation] This is for testing event creation after the
... event service is restarted.
[Tags] CI
- Open Connection And Log In
${uptime}= Execute Command systemctl restart obmc-phosphor-event.service
Sleep ${10}
@@ -142,7 +140,6 @@
[Documentation] This testcase is for testing deleted newly created event
... after event service is restarted.
[Tags] CI
- Open Connection And Log In
${uptime}= Execute Command systemctl restart obmc-phosphor-event.service
Sleep ${10}
@@ -163,7 +160,6 @@
[Tags] reboot_tests
${pre_reboot_event}= create a test log
- Open Connection And Log In
${output}= Execute Command /sbin/reboot
Sleep ${SYSTEM_SHUTDOWN_TIME}
Wait For Host To Ping ${OPENBMC_HOST}
@@ -204,7 +200,3 @@
${LOGID} = convert to integer ${json['data']}
${uri}= catenate SEPARATOR= /org/openbmc/records/events/ ${LOGID}
[return] ${uri}
-
-Open Connection And Log In
- Open connection ${OPENBMC_HOST}
- Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}