From: Niklas Hambuechen <[email protected]>

Found by cabal.

Signed-off-by: Niklas Hambuechen <[email protected]>
---
 Makefile.am                             |  1 +
 test/hs/Test/Ganeti/HTools/ExtLoader.hs | 13 ++++++++++---
 test/hs/htest.hs                        |  2 ++
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 89a1799..412044f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1627,6 +1627,7 @@ TEST_FILES = \
        test/data/htools/hsqueeze-overutilized.data \
        test/data/htools/hsqueeze-underutilized.data \
        test/data/htools/unique-reboot-order.data \
+       test/data/mond-data.txt \
        test/hs/shelltests/htools-balancing.test \
        test/hs/shelltests/htools-basic.test \
        test/hs/shelltests/htools-dynutil.test \
diff --git a/test/hs/Test/Ganeti/HTools/ExtLoader.hs 
b/test/hs/Test/Ganeti/HTools/ExtLoader.hs
index 40f92d0..31a6ccf 100644
--- a/test/hs/Test/Ganeti/HTools/ExtLoader.hs
+++ b/test/hs/Test/Ganeti/HTools/ExtLoader.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE TemplateHaskell #-}
+
 {-| Unittests for the MonD data parse function -}
 
 {-
@@ -30,9 +32,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 -}
 
-module Test.Ganeti.HTools.ExtLoader where
-
-import Data.Ratio
+module Test.Ganeti.HTools.ExtLoader
+  ( testHTools_ExtLoader
+  ) where
 
 import qualified Test.HUnit as HUnit
 import qualified Text.JSON as J
@@ -45,6 +47,7 @@ import Ganeti.DataCollectors.Types (DCReport(..))
 import Ganeti.HTools.ExtLoader
 import Ganeti.JSON
 import Test.Ganeti.TestCommon
+import Test.Ganeti.TestHelper
 
 {-# ANN module "HLint: ignore Use camelCase" #-}
 
@@ -119,3 +122,7 @@ compareCPUavgload a b =
      && relError (cavCpuTotal a) (cavCpuTotal b)
      && length (cavCpus a) == length (cavCpus b)
      && and (zipWith relError (cavCpus a) (cavCpus b))
+
+testSuite "HTools/ExtLoader"
+          [ 'case_parseMonDData
+          ]
diff --git a/test/hs/htest.hs b/test/hs/htest.hs
index 3852e2d..b244e0f 100644
--- a/test/hs/htest.hs
+++ b/test/hs/htest.hs
@@ -54,6 +54,7 @@ import Test.Ganeti.HTools.Backend.Text
 import Test.Ganeti.HTools.CLI
 import Test.Ganeti.HTools.Cluster
 import Test.Ganeti.HTools.Container
+import Test.Ganeti.HTools.ExtLoader
 import Test.Ganeti.HTools.Graph
 import Test.Ganeti.HTools.Instance
 import Test.Ganeti.HTools.Loader
@@ -128,6 +129,7 @@ allTests =
   , testHTools_CLI
   , testHTools_Cluster
   , testHTools_Container
+  , testHTools_ExtLoader
   , testHTools_Graph
   , testHTools_Instance
   , testHTools_Loader
-- 
2.1.0.rc2.206.gedb03e5

Reply via email to