Added Karaf logging to the Netconf readiness suite 57/29257/7
authorJozef Behran <jbehran@cisco.com>
Wed, 4 Nov 2015 12:19:00 +0000 (13:19 +0100)
committerJozef Behran <jbehran@cisco.com>
Wed, 11 Nov 2015 09:12:52 +0000 (10:12 +0100)
When the Netconf readiness suite fails, it is impossible to
figure out what karaf.log logs were produced during the time
it was running. Add commands to emit log messages into
karaf.log when it starts running and when it ends.

Change-Id: I9fc441ef4978551ee11a36b0da556cd921bea5a3
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/suites/netconf/ready/netconfready.robot

index 68884ab3ddfba38b2049fef7687bd96b20e600a4..4f04dd7c4f4f28885799c1dbef0be3f4808ae5da 100644 (file)
@@ -25,6 +25,7 @@ Documentation     netconf-connector readiness test suite.
 Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Library           RequestsLibrary
+Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
 Resource          ${CURDIR}/../../../libraries/Utils.robot
 Variables         ${CURDIR}/../../../variables/Variables.py
 
@@ -47,14 +48,17 @@ Wait_For_Netconf_Connector
 
 *** Keywords ***
 Setup_Everything
-    [Documentation]    Setup requests library.
+    [Documentation]    Setup requests library and log into karaf.log that the netconf readiness wait starts.
+    KarafKeywords.Open_Controller_Karaf_Console_On_Background
+    KarafKeywords.Log_Message_To_Controller_Karaf    Starting Netconf readiness test suite
     RequestsLibrary.Create_Session    ses    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
 
 Teardown_Everything
-    [Documentation]    Destroy all sessions in the requests library.
+    [Documentation]    Destroy all sessions in the requests library and log into karaf.log that the netconf readiness wait is over.
+    KarafKeywords.Log_Message_To_Controller_Karaf    Ending Netconf readiness test suite
     RequestsLibrary.Delete_All_Sessions
 
 Check_Netconf_Connector