Browse Source

HDDS-1631. Fix auditparser smoketests (#892)

Elek, Márton 6 years ago
parent
commit
5d5081eff8

+ 1 - 1
hadoop-ozone/dist/src/main/compose/ozone/test.sh

@@ -26,7 +26,7 @@ start_docker_env
 #Due to the limitation of the current auditparser test, it should be the
 #first test in a clean cluster.
 
-execute_robot_test scm auditparser
+execute_robot_test om auditparser
 
 execute_robot_test scm basic/basic.robot
 

+ 3 - 2
hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot

@@ -36,8 +36,9 @@ Initiating freon to generate data
                        Should Not Contain               ${result}  ERROR
 
 Testing audit parser
-    ${logfile} =       Execute              ls -t /opt/hadoop/logs | grep om-audit | head -1
-                       Execute              ozone auditparser /opt/hadoop/audit.db load "/opt/hadoop/logs/${logfile}"
+    ${logdir} =        Get Environment Variable      HADOOP_LOG_DIR     /var/log/hadoop
+    ${logfile} =       Execute              ls -t "${logdir}" | grep om-audit | head -1
+                       Execute              ozone auditparser /opt/hadoop/audit.db load "${logdir}/${logfile}"
     ${result} =        Execute              ozone auditparser /opt/hadoop/audit.db template top5cmds
                        Should Contain       ${result}  ALLOCATE_KEY
     ${result} =        Execute              ozone auditparser /opt/hadoop/audit.db template top5users