From f77f8c7c603069071d7a609adce3ed9bc1131c37 Mon Sep 17 00:00:00 2001 From: nik-redhat Date: Tue, 26 May 2020 18:45:46 +0530 Subject: 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 --- tests/volume.rc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index bc768c9434f..3924baeb7fc 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 -- cgit