ganeti

Safe HaskellNone

Test.Ganeti.Locking.Allocation

Contents

Description

Tests for lock allocation.

Synopsis

Documentation

data TestOwner Source #

Instances
Eq TestOwner # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

(==) :: TestOwner -> TestOwner -> Bool

(/=) :: TestOwner -> TestOwner -> Bool

Ord TestOwner # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

compare :: TestOwner -> TestOwner -> Ordering

(<) :: TestOwner -> TestOwner -> Bool

(<=) :: TestOwner -> TestOwner -> Bool

(>) :: TestOwner -> TestOwner -> Bool

(>=) :: TestOwner -> TestOwner -> Bool

max :: TestOwner -> TestOwner -> TestOwner

min :: TestOwner -> TestOwner -> TestOwner

Show TestOwner # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

showsPrec :: Int -> TestOwner -> ShowS

show :: TestOwner -> String

showList :: [TestOwner] -> ShowS

JSON TestOwner # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

readJSON :: JSValue -> Result TestOwner

showJSON :: TestOwner -> JSValue

readJSONs :: JSValue -> Result [TestOwner]

showJSONs :: [TestOwner] -> JSValue

Arbitrary TestOwner # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

data TestLock Source #

Instances
Eq TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

(==) :: TestLock -> TestLock -> Bool

(/=) :: TestLock -> TestLock -> Bool

Ord TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

compare :: TestLock -> TestLock -> Ordering

(<) :: TestLock -> TestLock -> Bool

(<=) :: TestLock -> TestLock -> Bool

(>) :: TestLock -> TestLock -> Bool

(>=) :: TestLock -> TestLock -> Bool

max :: TestLock -> TestLock -> TestLock

min :: TestLock -> TestLock -> TestLock

Read TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

readsPrec :: Int -> ReadS TestLock

readList :: ReadS [TestLock]

readPrec :: ReadPrec TestLock

readListPrec :: ReadPrec [TestLock]

Show TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

showsPrec :: Int -> TestLock -> ShowS

show :: TestLock -> String

showList :: [TestLock] -> ShowS

JSON TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Methods

readJSON :: JSValue -> Result TestLock

showJSON :: TestLock -> JSValue

readJSONs :: JSValue -> Result [TestLock]

showJSONs :: [TestLock] -> JSValue

Lock TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

Arbitrary TestLock # 
Instance details

Defined in Test.Ganeti.Locking.Allocation

requestSucceeded :: Ord a => Map a OwnerState -> LockRequest a -> Bool Source #

Verify that a given request is statisfied in list of owned locks

Orphan instances

Arbitrary OwnerState # 
Instance details

Arbitrary a => Arbitrary (LockRequest a) # 
Instance details

Methods

arbitrary :: Gen (LockRequest a)

shrink :: LockRequest a -> [LockRequest a]

(Arbitrary a, Lock a, Arbitrary b, Ord b, Show b) => Arbitrary (LockAllocation a b) # 
Instance details

Methods

arbitrary :: Gen (LockAllocation a b)

shrink :: LockAllocation a b -> [LockAllocation a b]