LGTM
On Wed, Apr 9, 2014 at 9:06 PM, Klaus Aehlig <[email protected]> wrote: > Verify that the JSON encoding of a LockRequest can correctly > be decoded. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > test/hs/Test/Ganeti/Locking/Allocation.hs | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/test/hs/Test/Ganeti/Locking/Allocation.hs > b/test/hs/Test/Ganeti/Locking/Allocation.hs > index 99a3572..b784af4 100644 > --- a/test/hs/Test/Ganeti/Locking/Allocation.hs > +++ b/test/hs/Test/Ganeti/Locking/Allocation.hs > @@ -380,6 +380,13 @@ prop_OwnerSound = > . flip all (lockOwners state) $ \owner -> > not . M.null $ listLocks owner state > > +-- | Verify that for LockRequest we have readJSON . showJSON = Ok. > +prop_ReadShowRequest :: Property > +prop_ReadShowRequest = > + forAll (arbitrary :: Gen (LockRequest TestLock)) $ \state -> > + J.readJSON (J.showJSON state) ==? J.Ok state > + > + > testSuite "Locking/Allocation" > [ 'prop_LocksDisjoint > , 'prop_LockslistComplete > @@ -398,4 +405,5 @@ testSuite "Locking/Allocation" > , 'prop_ReadShow > , 'prop_OwnerComplete > , 'prop_OwnerSound > + , 'prop_ReadShowRequest > ] > -- > 1.9.1.423.g4596e3a > >
