[pykickstart:rhel7/master 5/5] Some tests for --size and --percent (#1117908)

Chris Lumens clumens at redhat.com
Wed Sep 10 19:31:17 UTC 2014


> 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.")

I don't mind if the first argument to these assert_parse_error calls is
all on one very long line.

Otherwise, it all looks fine to me.  Thanks!

- Chris


More information about the anaconda-patches mailing list