Skip to content

Commit 89acbbc

Browse files
elekbharatviswa504
authored andcommitted
HDDS-1677. Auditparser robot test shold use a world writable working directory (#958)
1 parent bcfd228 commit 89acbbc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ Library BuiltIn
2020
Resource ../commonlib.robot
2121

2222
*** Variables ***
23-
${user} hadoop
24-
${count} 4
23+
${user} hadoop
24+
${count} 4
25+
${auditworkdir} /tmp/
2526

2627
*** Keywords ***
2728
Set username
@@ -38,15 +39,15 @@ Initiating freon to generate data
3839
Testing audit parser
3940
${logdir} = Get Environment Variable HADOOP_LOG_DIR /var/log/hadoop
4041
${logfile} = Execute ls -t "${logdir}" | grep om-audit | head -1
41-
Execute ozone auditparser /opt/hadoop/audit.db load "${logdir}/${logfile}"
42-
${result} = Execute ozone auditparser /opt/hadoop/audit.db template top5cmds
42+
Execute ozone auditparser "${auditworkdir}/audit.db" load "${logdir}/${logfile}"
43+
${result} = Execute ozone auditparser "${auditworkdir}/audit.db" template top5cmds
4344
Should Contain ${result} ALLOCATE_KEY
44-
${result} = Execute ozone auditparser /opt/hadoop/audit.db template top5users
45+
${result} = Execute ozone auditparser "${auditworkdir}/audit.db" template top5users
4546
Run Keyword If '${SECURITY_ENABLED}' == 'true' Set username
4647
Should Contain ${result} ${user}
47-
${result} = Execute ozone auditparser /opt/hadoop/audit.db query "select count(*) from audit where op='CREATE_VOLUME' and RESULT='SUCCESS'"
48+
${result} = Execute ozone auditparser "${auditworkdir}/audit.db" query "select count(*) from audit where op='CREATE_VOLUME' and RESULT='SUCCESS'"
4849
${result} = Convert To Number ${result}
4950
Should be true ${result}>${count}
50-
${result} = Execute ozone auditparser /opt/hadoop/audit.db query "select count(*) from audit where op='CREATE_BUCKET' and RESULT='SUCCESS'"
51+
${result} = Execute ozone auditparser "${auditworkdir}/audit.db" query "select count(*) from audit where op='CREATE_BUCKET' and RESULT='SUCCESS'"
5152
${result} = Convert To Number ${result}
5253
Should be true ${result}>${count}

0 commit comments

Comments
 (0)