Revision 4a90bd4f test/hs/Test/Ganeti/OpCodes.hs

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

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

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

  

Also available in: Unified diff