Revision 5b11f8db htest/Test/Ganeti/Objects.hs

b/htest/Test/Ganeti/Objects.hs
47 47
import Ganeti.Objects as Objects
48 48
import Ganeti.JSON
49 49

  
50
{-# ANN module "HLint: ignore Use camelCase" #-}
51

  
50 52
-- * Arbitrary instances
51 53

  
52 54
$(genArbitrary ''Hypervisor)
......
79 81
-- properties, we only generate disks with no children (FIXME), as
80 82
-- generating recursive datastructures is a bit more work.
81 83
instance Arbitrary Disk where
82
  arbitrary = Disk <$> arbitrary <*> (pure []) <*> arbitrary
84
  arbitrary = Disk <$> arbitrary <*> pure [] <*> arbitrary
83 85
                   <*> arbitrary <*> arbitrary
84 86

  
85 87
-- FIXME: we should generate proper values, >=0, etc., but this is
......
102 104
      <$> getFQDN <*> getFQDN <*> getFQDN -- OS name, but...
103 105
      <*> arbitrary
104 106
      -- FIXME: add non-empty hvparams when they're a proper type
105
      <*> (pure $ Container Map.empty) <*> arbitrary
107
      <*> pure (Container Map.empty) <*> arbitrary
106 108
      -- ... and for OSParams
107
      <*> (pure $ Container Map.empty) <*> arbitrary <*> arbitrary
109
      <*> pure (Container Map.empty) <*> arbitrary <*> arbitrary
108 110
      <*> arbitrary <*> arbitrary <*> arbitrary
109 111
      -- ts
110 112
      <*> arbitrary <*> arbitrary
......
127 129
-- validation rules.
128 130
instance Arbitrary NodeGroup where
129 131
  arbitrary = NodeGroup <$> getFQDN <*> pure [] <*> arbitrary <*> arbitrary
130
                        <*> arbitrary <*> (pure $ Container Map.empty)
132
                        <*> arbitrary <*> pure (Container Map.empty)
131 133
                        -- ts
132 134
                        <*> arbitrary <*> arbitrary
133 135
                        -- uuid
......
181 183
                                      nodeName = nodeName n ++ show idx })
182 184
               nodes [(1::Int)..]
183 185
      contnodes = Container . Map.fromList $ map (\n -> (nodeName n, n)) nodes'
184
      continsts = Container $ Map.empty
186
      continsts = Container Map.empty
185 187
  grp <- arbitrary
186 188
  let contgroups = Container $ Map.singleton guuid grp
187 189
  serial <- arbitrary

Also available in: Unified diff