diff options
author | vmallika <vmallika@redhat.com> | 2016-02-09 18:11:24 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-02-15 00:20:39 -0800 |
commit | fa3df1f5eaf3104c0eb597b954dd17b1a067db8c (patch) | |
tree | dbc5458abfba05d2e40e8473acdb273414df4d03 /tests/basic/uss.t | |
parent | 87faa0d763e1c416f12becc84b4c62cf6d545d1d (diff) |
uss: validate USS option features.snapshot-directory
This is a backport of http://review.gluster.org/#/c/9209
USS option features.snapshot-directory
contains only 'alphanum, -, _, .'
starts with dot (.)
value cannot exceed 255 characters
and throws error for any other argument.
> Change-Id: Iad64635206ddf5599351020d99aafb3dd9d17bc1
> BUG: 1168819
> Signed-off-by: vmallika <vmallika@redhat.com>
> Reviewed-on: http://review.gluster.org/9209
> Smoke: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com>
> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Change-Id: I1b85d6851a223b51714c0498b457c41db99f5f58
BUG: 1305868
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/13409
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'tests/basic/uss.t')
-rw-r--r-- | tests/basic/uss.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basic/uss.t b/tests/basic/uss.t index 60fcadffd2e..7a4f043d260 100644 --- a/tests/basic/uss.t +++ b/tests/basic/uss.t @@ -68,6 +68,18 @@ for i in {1..10}; do TEST_IN_LOOP ! $CLI volume set $V0 features.uss $RANDOM_STRING done +## Test that features.snapshot-directory: +## contains only '0-9a-z-_' +# starts with dot (.) +# value cannot exceed 255 characters +## and throws error for any other argument. +TEST ! $CLI volume set $V0 features.snapshot-directory a/b +TEST ! $CLI volume set $V0 features.snapshot-directory snaps +TEST ! $CLI volume set $V0 features.snapshot-directory -a +TEST ! $CLI volume set $V0 features.snapshot-directory . +TEST ! $CLI volume set $V0 features.snapshot-directory .. +TEST ! $CLI volume set $V0 features.snapshot-directory .123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 + TEST $CLI volume set $V0 features.uss enable; EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 |