LGTM

On Tue, Mar 4, 2014 at 11:01 AM, Klaus Aehlig <[email protected]> wrote:

> With the extension of Ganeti.Locking.Locks.GanetiLocks to the
> full lock hierarchy, also extend the instantiation of Arbitrary.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  test/hs/Test/Ganeti/Locking/Locks.hs | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/test/hs/Test/Ganeti/Locking/Locks.hs
> b/test/hs/Test/Ganeti/Locking/Locks.hs
> index 9edd5cf..3354981 100644
> --- a/test/hs/Test/Ganeti/Locking/Locks.hs
> +++ b/test/hs/Test/Ganeti/Locking/Locks.hs
> @@ -28,6 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor,
> Boston, MA
>
>  module Test.Ganeti.Locking.Locks (testLocking_Locks) where
>
> +import Control.Applicative ((<$>))
> +
>  import Test.QuickCheck
>  import Text.JSON
>
> @@ -37,7 +39,19 @@ import Test.Ganeti.TestCommon
>  import Ganeti.Locking.Locks
>
>  instance Arbitrary GanetiLocks where
> -  arbitrary = elements [BGL]
> +  arbitrary = oneof [ return BGL
> +                    , return ClusterLockSet
> +                    , return InstanceLockSet
> +                    , Instance <$> genUUID
> +                    , return NodeGroupLockSet
> +                    , NodeGroup <$> genUUID
> +                    , return NAL
> +                    , return NodeAllocLockSet
> +                    , return NodeResLockSet
> +                    , NodeRes <$> genUUID
> +                    , return NodeLockSet
> +                    , Node <$> genUUID
> +                    ]
>
>  -- | Verify that readJSON . showJSON = Ok
>  prop_ReadShow :: Property
> --
> 1.9.0.279.gdc9e3eb
>
>

Reply via email to