summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorubansal <ubansal@redhat.com>2019-08-21 12:39:11 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-09-11 08:50:18 +0000
commit32623566f1a12b9b6f22300b76f5941c5e8b8c75 (patch)
treee0c4229f9959d0fd743bd0ef96c5aa24c69259b6
parentea560949078ce0c0e50ade4046781b0ee94c3b7b (diff)
Add 7 negative scenarios for EC volume create
With redundancy count as negative or disperse count with negative(different permutations) and disperse data count equal to disperse count Change-Id: I761851c64833256532464f56a9a78e20ceb8a4e1 Signed-off-by: ubansal <ubansal@redhat.com>
-rw-r--r--tests/functional/disperse/test_ec_validate_volume_creation.py74
1 files changed, 73 insertions, 1 deletions
diff --git a/tests/functional/disperse/test_ec_validate_volume_creation.py b/tests/functional/disperse/test_ec_validate_volume_creation.py
index d9e490c..b181980 100644
--- a/tests/functional/disperse/test_ec_validate_volume_creation.py
+++ b/tests/functional/disperse/test_ec_validate_volume_creation.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2019 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -135,3 +135,75 @@ class EcValidateVolumeCreate(GlusterBaseClass):
self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
"%s", self.volname))
g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_five(self):
+ # Setup input parameters
+ self.volume['voltype']['disperse_data_count'] = 6
+ self.volume['voltype']['disperse_count'] = 6
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_six(self):
+ # Setup input parameters
+ self.volume['voltype']['disperse_data_count'] = 4
+ self.volume['voltype']['disperse_count'] = 4
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_seven(self):
+ # Setup input parameters
+ self.volume['voltype']['redundancy_count'] = -2
+ self.volume['voltype']['disperse_count'] = 6
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_eight(self):
+ # Setup input parameters
+ self.volume['voltype']['redundancy_count'] = -2
+ self.volume['voltype']['disperse_count'] = -4
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_nine(self):
+ # Setup input parameters
+ self.volume['voltype']['redundancy_count'] = 2
+ self.volume['voltype']['disperse_count'] = -4
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")
+
+ def test_invalid_usecase_ten(self):
+ # Setup input parameters
+ self.volume['voltype']['redundancy_count'] = 2
+ self.volume['voltype']['disperse_count'] = 0
+
+ # Setup Volume and Mount Volume
+ g.log.info("Starting to Setup Volume and Mount Volume")
+ ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
+ self.assertFalse(ret, ("Volume Setup and Mount succeeded for volume "
+ "%s", self.volname))
+ g.log.info("Successfully verified invalid input parameters")