Revision aa922d64 test/hs/Test/Ganeti/OpCodes.hs

b/test/hs/Test/Ganeti/OpCodes.hs
69 69

  
70 70
$(genArbitrary ''DiskAccess)
71 71

  
72
$(genArbitrary ''InstReasonSrc)
73

  
74 72
instance Arbitrary OpCodes.DiskIndex where
75 73
  arbitrary = choose (0, C.maxDisks - 1) >>= OpCodes.mkDiskIndex
76 74

  
......
241 239
          arbitrary <*> arbitrary
242 240
      "OP_INSTANCE_REBOOT" ->
243 241
        OpCodes.OpInstanceReboot <$> genFQDN <*> arbitrary <*>
244
          arbitrary <*> arbitrary <*> ((,) <$> arbitrary <*> genStringNE)
242
          arbitrary <*> arbitrary
245 243
      "OP_INSTANCE_MOVE" ->
246 244
        OpCodes.OpInstanceMove <$> genFQDN <*> arbitrary <*> arbitrary <*>
247 245
          genNodeNameNE <*> arbitrary
......
398 396
  octets <- vectorOf 3 $ choose (0::Int, 255)
399 397
  mkNonEmpty . intercalate ":" $ map (printf "%02x") octets
400 398

  
401
-- | Generate a non empty string
402
genStringNE :: Gen NonEmptyString
403
genStringNE = genName >>= mkNonEmpty
404

  
405 399
-- | Arbitrary instance for MetaOpCode, defined here due to TH ordering.
406 400
$(genArbitrary ''OpCodes.MetaOpCode)
407 401

  

Also available in: Unified diff