summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-10-20 12:58:16 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-11-01 23:28:26 -0700
commit9a2b3fb8b9ff28edafa012dacc5f5f0e4ee1afab (patch)
tree5d9be4a6410894c75883ef4e9933d4b625c36642 /tests/basic
parent9340b3c7a6c8556d6f1d4046de0dbd1946a64963 (diff)
snapshot: Fix the failure to recreate clones with same name
The brick path of snapshot clones contained the clonename, thereby failing to create newer clones with the same name after the original clone had been deleted. This fix creates the brick path with the clone's vol id instead of the clones name. Hence future clones with the same name will not have the namespace clash. Change-Id: I262712adc576122f051b5d1ce171d020efaefd1a BUG: 1387160 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/15683 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'tests/basic')
-rwxr-xr-xtests/basic/volume-snapshot-clone.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basic/volume-snapshot-clone.t b/tests/basic/volume-snapshot-clone.t
index 7c0ec7e0f5a..5348582a22e 100755
--- a/tests/basic/volume-snapshot-clone.t
+++ b/tests/basic/volume-snapshot-clone.t
@@ -96,6 +96,19 @@ EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count;
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V0}_clone 'Status';
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V1}_clone 'Status';
+
+TEST $CLI_1 volume stop ${V0}_clone
+TEST $CLI_1 volume stop ${V1}_clone
+
+TEST $CLI_1 volume delete ${V0}_clone
+TEST $CLI_1 volume delete ${V1}_clone
+
+TEST $CLI_1 snapshot clone ${V0}_clone ${V0}_snap
+TEST $CLI_1 snapshot clone ${V1}_clone ${V1}_snap
+
+EXPECT 'Created' volinfo_field ${V0}_clone 'Status';
+EXPECT 'Created' volinfo_field ${V1}_clone 'Status';
+
#Clean up
stop_force_volumes 2
EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT 'Stopped' volinfo_field $V0 'Status';