diff options
author | M S Vishwanath Bhat <vishwanath@gluster.com> | 2012-01-04 17:45:27 +0530 |
---|---|---|
committer | M S Vishwanath Bhat <vishwanath@gluster.com> | 2012-01-05 19:58:31 +0530 |
commit | d59bb5c8e1cb86e625eb84397b7a6b36d6120ceb (patch) | |
tree | f834c94e21ffb8339f4b59f70c95b14140f298f5 | |
parent | 587965d2268fe579eaca44e6d1a942a653c4595e (diff) |
FRAMEWORK: regression_helper -- Checks for arguement in gluster volume mount functions.
Change-Id: I763f0ae2ee95860e5b02ac571ba6ae73978c51a9
Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
-rw-r--r-- | regression_helpers | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/regression_helpers b/regression_helpers index 6cad82f..dd9ce25 100644 --- a/regression_helpers +++ b/regression_helpers @@ -80,7 +80,12 @@ start_glusterd () mount_glusterfs () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_glusterfs'" + exit 1 + else + local volname=$1; + fi $GLUSTERFSDIR/glusterfs --volfile-server=$(hostname) --volfile-id=$volname $FUSE_MOUNT; sleep 5; @@ -88,7 +93,12 @@ mount_glusterfs () mount_glusterfs_with_acl () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_glusterfs_with_acl'" + exit 1 + else + local volname=$1; + fi $GLUSTERFSDIR/glusterfs --acl --volfile-server=$(hostname) --volfile-id=$volname $FUSE_MOUNT; sleep 5; @@ -97,10 +107,15 @@ mount_glusterfs_with_acl () mount_nfs () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_nfs'" + exit 1 + else + local volname=$1; + fi - sleep 5; mount $(hostname):$volname $NFS_MOUNT; + sleep 5; } run_testcase () |