summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authornik-redhat <nladha@redhat.com>2020-05-26 18:45:46 +0530
committerSanju Rakonde <sanjurakonde@review.gluster.org>2020-07-06 13:15:18 +0000
commitf77f8c7c603069071d7a609adce3ed9bc1131c37 (patch)
treebcab1a1cd524f3d85a2079158cfdaf4c3b9367c2 /tests/volume.rc
parentd03493e136e799450b5c975a715ec135c3434245 (diff)
tests: added volume operations to increase code coverage
Added test for volume options like localtime-logging, fixed enable-shared-storage to include function coverage and few negative tests for other volume options to increase the code coverage in the glusterd component. Change-Id: Ib1706c1fd5bc98a64dcb5c8b15a121d639a597d7 Updates: #1052 Signed-off-by: nik-redhat <nladha@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index bc768c9..3924bae 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -992,3 +992,11 @@ function get-xml()
{
$CLI $1 --xml | xmllint --format - | grep $2 | sed 's/\(<"$2">\|<\/"$2">\)//g'
}
+
+function logging_time_check()
+{
+ local logdir=$1
+ local logfile=`echo ${0##*/}`_glusterd1.log
+
+ cat $logdir/1/$logfile | tail -n 2 | head -n 1 | grep $(date +%H:%M) | wc -l
+} \ No newline at end of file