Haskell/python compatibility test for networks
[ganeti-local] / htest / test.hs
index b41fb99..3bb1294 100644 (file)
@@ -28,12 +28,16 @@ module Main(main) where
 import Data.Monoid (mappend)
 import Test.Framework
 import System.Environment (getArgs)
+import System.Log.Logger
 
 import Test.Ganeti.TestImports ()
 import Test.Ganeti.Attoparsec
 import Test.Ganeti.BasicTypes
+import Test.Ganeti.Block.Drbd.Parser
+import Test.Ganeti.Block.Drbd.Types
 import Test.Ganeti.Common
 import Test.Ganeti.Confd.Utils
+import Test.Ganeti.Confd.Types
 import Test.Ganeti.Daemon
 import Test.Ganeti.Errors
 import Test.Ganeti.HTools.Backend.Simu
@@ -41,6 +45,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.Graph
 import Test.Ganeti.HTools.Instance
 import Test.Ganeti.HTools.Loader
 import Test.Ganeti.HTools.Node
@@ -49,6 +54,7 @@ import Test.Ganeti.HTools.Types
 import Test.Ganeti.JSON
 import Test.Ganeti.Jobs
 import Test.Ganeti.Luxi
+import Test.Ganeti.Network
 import Test.Ganeti.Objects
 import Test.Ganeti.OpCodes
 import Test.Ganeti.Query.Filter
@@ -57,6 +63,7 @@ import Test.Ganeti.Query.Query
 import Test.Ganeti.Rpc
 import Test.Ganeti.Ssconf
 import Test.Ganeti.THH
+import Test.Ganeti.Types
 import Test.Ganeti.Utils
 
 -- | Our default test options, overring the built-in test-framework
@@ -77,14 +84,18 @@ allTests =
   [ testBasicTypes
   , testAttoparsec
   , testCommon
+  , testConfd_Types
   , testConfd_Utils
   , testDaemon
+  , testBlock_Drbd_Parser
+  , testBlock_Drbd_Types
   , testErrors
   , testHTools_Backend_Simu
   , testHTools_Backend_Text
   , testHTools_CLI
   , testHTools_Cluster
   , testHTools_Container
+  , testHTools_Graph
   , testHTools_Instance
   , testHTools_Loader
   , testHTools_Node
@@ -93,6 +104,7 @@ allTests =
   , testJSON
   , testJobs
   , testLuxi
+  , testNetwork
   , testObjects
   , testOpCodes
   , testQuery_Filter
@@ -101,6 +113,7 @@ allTests =
   , testRpc
   , testSsconf
   , testTHH
+  , testTypes
   , testUtils
   ]
 
@@ -110,4 +123,8 @@ main :: IO ()
 main = do
   ropts <- getArgs >>= interpretArgsOrExit
   let opts = maybe defOpts (defOpts `mappend`) $ ropt_test_options ropts
+  -- silence the logging system, so that tests can execute I/O actions
+  -- which create logs without polluting stderr
+  -- FIXME: improve this by allowing tests to use logging if needed
+  updateGlobalLogger rootLoggerName (setLevel EMERGENCY)
   defaultMainWithOpts allTests (ropts { ropt_test_options = Just opts })