diff options
author | Amar Tumballi <amar@gluster.com> | 2012-01-05 22:26:27 -0800 |
---|---|---|
committer | Gerrit Code Review <root@dev.gluster.com> | 2012-01-05 22:26:27 -0800 |
commit | 6fed5ca8b66b5e44ceb3ee1ab359f41c0bd84d49 (patch) | |
tree | f0f0ac3dfd179ee4e6efb2d92461313767dd9d16 | |
parent | 98133b8fdc001cc2935a0188c063a14ef8dac7c5 (diff) | |
parent | 04f1cd8c70bf53c021199f99665b7452e6eb51aa (diff) |
Merge "BUG:2722 -- Checks for proper messages in volume top"
-rwxr-xr-x | dvm/2722/testcase | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dvm/2722/testcase b/dvm/2722/testcase new file mode 100755 index 0000000..cbac158 --- /dev/null +++ b/dvm/2722/testcase @@ -0,0 +1,30 @@ +#!/bin/bash + + +function check_volume_top_messages () +{ + $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 2>/dev/null 1>/dev/null; + $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + sleep 2; + + #'volume top successful' message should NOT be shown for all succeeded top operations. + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024000 count 100 | grep "volume top successful" 2>/dev/null 1>/dev/null; + ret1=$? + + #message 'no entries in the list' should NOT be displayed. + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024000 count 100 | grep "no entries in the list" 2>/dev/null 1>/dev/null; + ret2=$? + + #volume top on a non-existant brick should display the message 'volume top unsuccessful'. + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024000 count 100 brick $(hostname):$EXPORT_DIR/$global_bug_id/brick11 | grep "volume top unsuccessful" 2>/dev/null 1>/dev/null; + ret3=$? + + if [ $ret1 -ne 0 ] && [ $ret2 -ne 0 ] && [ $ret3 -eq 0 ]; then + return 0 + else + return 1 + fi +} + + +source $cwd/regression_helpers; check_volume_top_messages |