Haskell/python compatibility test for networks
[ganeti-local] / htest / test.hs
index b4aa2ab..3bb1294 100644 (file)
@@ -28,6 +28,7 @@ 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
@@ -36,6 +37,7 @@ 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
@@ -43,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
@@ -51,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
@@ -80,6 +84,7 @@ allTests =
   [ testBasicTypes
   , testAttoparsec
   , testCommon
+  , testConfd_Types
   , testConfd_Utils
   , testDaemon
   , testBlock_Drbd_Parser
@@ -90,6 +95,7 @@ allTests =
   , testHTools_CLI
   , testHTools_Cluster
   , testHTools_Container
+  , testHTools_Graph
   , testHTools_Instance
   , testHTools_Loader
   , testHTools_Node
@@ -98,6 +104,7 @@ allTests =
   , testJSON
   , testJobs
   , testLuxi
+  , testNetwork
   , testObjects
   , testOpCodes
   , testQuery_Filter
@@ -116,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 })