[pykickstart:rhel7/master 5/5] Some tests for --size and --percent (#1117908)
mulhern
amulhern at redhat.com
Wed Sep 10 18:44:10 UTC 2014
Related: rhbz#1117908
Signed-off-by: mulhern <amulhern at redhat.com>
---
tests/commands/logvol.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/commands/logvol.py b/tests/commands/logvol.py
index 55b8911..74f9d44 100644
--- a/tests/commands/logvol.py
+++ b/tests/commands/logvol.py
@@ -285,6 +285,20 @@ class F20_TestCase(F18_TestCase):
"--chunksize=512",
regex="--chunksize and --metadatasize are for thin pools only")
+ # logvol w/out specified size
+ self.assert_parse_error("logvol none --name=pool1 --vgname=vg "
+ "--thinpool",
+ regex="No size given for logical volume")
+
+ # use existing logvol, which must have a size
+ self.assert_parse("logvol none --name=pool1 --vgname=vg "
+ "--thinpool --useexisting")
+
+ # logvol with a disallowed percent value
+ self.assert_parse_error("logvol / --percent=1000 --name=NAME "
+ "--vgname=VGNAME",
+ KickstartValueError,
+ "Percentage must be between 0 and 100.")
if __name__ == "__main__":
unittest.main()
--
1.9.3
More information about the anaconda-patches
mailing list