Skip to content
Snippets Groups Projects
Commit dde85e1e authored by Iustin Pop's avatar Iustin Pop
Browse files

Add export lists for files which didn't have them


Two test helper files didn't have export lists (lost during the split
of tests). This patch finally reintroduces them, to hopefully make the
export list saner and with fewer changes for purely-internal changes.

Additionally, a few missing docstrings are added as well.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 3cbd5808
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,42 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -23,7 +23,42 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-} -}
module Test.Ganeti.TestCommon where module Test.Ganeti.TestCommon
( maxMem
, maxDsk
, maxCpu
, maxVcpuRatio
, maxSpindleRatio
, maxNodes
, maxOpCodes
, (==?)
, (/=?)
, failTest
, passTest
, pythonCmd
, runPython
, checkPythonResult
, DNSChar(..)
, genName
, genFQDN
, genMaybe
, genTags
, genFields
, genUniquesList
, SmallRatio(..)
, genSet
, genIp4AddrStr
, genIp4Addr
, genIp4NetWithNetmask
, genIp4Net
, genIp6Addr
, genIp6Net
, netmask2NumHosts
, testSerialisation
, resultProp
, readTestData
, genSample
) where
import Control.Applicative import Control.Applicative
import Control.Exception (catchJust) import Control.Exception (catchJust)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{- {-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -25,7 +25,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -25,7 +25,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-} -}
module Test.Ganeti.TestHTools where module Test.Ganeti.TestHTools
( nullIPolicy
, defGroup
, defGroupList
, defGroupAssoc
, createInstance
, makeSmallCluster
, setInstanceSmallerThanNode
) where
import qualified Data.Map as Map import qualified Data.Map as Map
...@@ -71,14 +79,17 @@ nullIPolicy = Types.IPolicy ...@@ -71,14 +79,17 @@ nullIPolicy = Types.IPolicy
, Types.iPolicySpindleRatio = maxSpindleRatio , Types.iPolicySpindleRatio = maxSpindleRatio
} }
-- | Default group definition.
defGroup :: Group.Group defGroup :: Group.Group
defGroup = flip Group.setIdx 0 $ defGroup = flip Group.setIdx 0 $
Group.create "default" Types.defaultGroupID Types.AllocPreferred Group.create "default" Types.defaultGroupID Types.AllocPreferred
nullIPolicy [] nullIPolicy []
-- | Default group, as a (singleton) 'Group.List'.
defGroupList :: Group.List defGroupList :: Group.List
defGroupList = Container.fromList [(Group.idx defGroup, defGroup)] defGroupList = Container.fromList [(Group.idx defGroup, defGroup)]
-- | Default group, as a string map.
defGroupAssoc :: Map.Map String Types.Gdx defGroupAssoc :: Map.Map String Types.Gdx
defGroupAssoc = Map.singleton (Group.uuid defGroup) (Group.idx defGroup) defGroupAssoc = Map.singleton (Group.uuid defGroup) (Group.idx defGroup)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment