default user for verifying karaf log file should be ${CONTROLLER_USER} 10/25210/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 12 Aug 2015 22:33:51 +0000 (15:33 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 13 Aug 2015 09:25:53 +0000 (09:25 +0000)
hopefully we will end up using more descriptive variables like
ODLVM1_USER, but for now CONTROLLER_USER is avaiable.  This patch
fixes a bug, where the default user for "Run Command On Remote
System" has it's default user as ${MININET_USER}.  If the
given environment has different users for the mininet and controller
VM, this keyword "Check Karaf Log File Does Not Have Messages"
ended up using ${MININET_USER} which is obviously wrong since
the karaf.log file is always going to be on the controller.

small bug, but hit me locally.

Change-Id: Id9ef26a1ac691a814e6165bd55cbf69edc3e325f
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
test/csit/libraries/KarafKeywords.robot

index 0be4ca024adbc8d5c701eb80c943d9a71fc09c47..eaa82c36bbefa1d554697238f1d7498bb19f1a6c 100644 (file)
@@ -9,8 +9,10 @@ ${BUNDLEFOLDER}    distribution-karaf-0.3.0-SNAPSHOT
 
 *** Keywords ***
 Check Karaf Log File Does Not Have Messages
-    [Arguments]    ${ip}    ${message}    ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
-    ${output}=    Run Command On Remote System    ${ip}    grep ${message} ${log_file}
+    [Arguments]    ${ip}    ${message}    ${user}=${CONTROLLER_USER}    ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
+    [Documentation]    Fails if the provided ${message} is found in the karaf.log file.  Uses grep to search.  The
+    ...    karaf.log file can be overridden with ${log_file} to be any file on the given system @ ${ip}
+    ${output}=    Run Command On Remote System    ${ip}    grep ${message} ${log_file}    ${user}
     Should Not Contain    ${output}    ${message}
 
 Verify Feature Is Installed