Revision bcd17bf0

b/htools/Ganeti/HTools/QC.hs
770 770
    where n = node { Node.failN1 = True, Node.offline = False
771 771
                   , Node.iPolicy = Types.defIPolicy }
772 772

  
773
prop_Text_ISpecIdempotent ispec =
774
  case Text.loadISpec "dummy" . Utils.sepSplit ',' .
775
       Text.serializeISpec $ ispec of
776
    Types.Bad msg -> printTestCase ("Failed to load ispec: " ++ msg) False
777
    Types.Ok ispec' -> ispec ==? ispec'
778

  
779
prop_Text_IPolicyIdempotent ipol =
780
  case Text.loadIPolicy . Utils.sepSplit '|' $
781
       Text.serializeIPolicy owner ipol of
782
    Types.Bad msg -> printTestCase ("Failed to load ispec: " ++ msg) False
783
    Types.Ok res -> (owner, ipol) ==? res
784
  where owner = "dummy"
785

  
773 786
-- | This property, while being in the text tests, does more than just
774 787
-- test end-to-end the serialisation and loading back workflow; it
775 788
-- also tests the Loader.mergeData and the actuall
......
812 825
            , 'prop_Text_Load_Node
813 826
            , 'prop_Text_Load_NodeFail
814 827
            , 'prop_Text_NodeLSIdempotent
828
            , 'prop_Text_ISpecIdempotent
829
            , 'prop_Text_IPolicyIdempotent
815 830
            , 'prop_Text_CreateSerialise
816 831
            ]
817 832

  
b/htools/Ganeti/HTools/Text.hs
31 31
  , parseData
32 32
  , loadInst
33 33
  , loadNode
34
  , loadISpec
35
  , loadIPolicy
34 36
  , serializeInstances
35 37
  , serializeNode
36 38
  , serializeNodes
39
  , serializeGroup
40
  , serializeISpec
41
  , serializeIPolicy
37 42
  , serializeCluster
38 43
  ) where
39 44

  

Also available in: Unified diff