Statistics
| Branch: | Tag: | Revision:

root / test / hs / Test / AutoConf.hs @ 560ef132

History | View | Annotate | Download (8.6 kB)

1 e4dac3e1 Jose A. Lopes
{-# LANGUAGE TemplateHaskell #-}
2 e4dac3e1 Jose A. Lopes
{-| Unittests for 'AutoConf'
3 e4dac3e1 Jose A. Lopes
4 e4dac3e1 Jose A. Lopes
-}
5 e4dac3e1 Jose A. Lopes
6 e4dac3e1 Jose A. Lopes
{-
7 e4dac3e1 Jose A. Lopes
8 e4dac3e1 Jose A. Lopes
Copyright (C) 2013 Google Inc.
9 e4dac3e1 Jose A. Lopes
10 e4dac3e1 Jose A. Lopes
This program is free software; you can redistribute it and/or modify
11 e4dac3e1 Jose A. Lopes
it under the terms of the GNU General Public License as published by
12 e4dac3e1 Jose A. Lopes
the Free Software Foundation; either version 2 of the License, or
13 e4dac3e1 Jose A. Lopes
(at your option) any later version.
14 e4dac3e1 Jose A. Lopes
15 e4dac3e1 Jose A. Lopes
This program is distributed in the hope that it will be useful, but
16 e4dac3e1 Jose A. Lopes
WITHOUT ANY WARRANTY; without even the implied warranty of
17 e4dac3e1 Jose A. Lopes
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 e4dac3e1 Jose A. Lopes
General Public License for more details.
19 e4dac3e1 Jose A. Lopes
20 e4dac3e1 Jose A. Lopes
You should have received a copy of the GNU General Public License
21 e4dac3e1 Jose A. Lopes
along with this program; if not, write to the Free Software
22 e4dac3e1 Jose A. Lopes
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 e4dac3e1 Jose A. Lopes
02110-1301, USA.
24 e4dac3e1 Jose A. Lopes
25 e4dac3e1 Jose A. Lopes
-}
26 e4dac3e1 Jose A. Lopes
27 e4dac3e1 Jose A. Lopes
module Test.AutoConf where
28 e4dac3e1 Jose A. Lopes
29 e4dac3e1 Jose A. Lopes
import qualified Data.Char as Char (isAlpha)
30 e4dac3e1 Jose A. Lopes
import Test.HUnit as HUnit
31 e4dac3e1 Jose A. Lopes
32 e4dac3e1 Jose A. Lopes
import qualified AutoConf
33 e4dac3e1 Jose A. Lopes
import qualified Test.Ganeti.TestHelper as TestHelper
34 e4dac3e1 Jose A. Lopes
35 e4dac3e1 Jose A. Lopes
{-# ANN module "HLint: ignore Use camelCase" #-}
36 e4dac3e1 Jose A. Lopes
37 e4dac3e1 Jose A. Lopes
-- | 'isFilePath x' tests whether @x@ is a valid filepath
38 e4dac3e1 Jose A. Lopes
--
39 e4dac3e1 Jose A. Lopes
-- A valid filepath must be absolute and must not contain commas.
40 e4dac3e1 Jose A. Lopes
isFilePath :: String -> Bool
41 e4dac3e1 Jose A. Lopes
isFilePath ('/':str) = ',' `notElem` str
42 e4dac3e1 Jose A. Lopes
isFilePath _ = False
43 e4dac3e1 Jose A. Lopes
44 e4dac3e1 Jose A. Lopes
-- | 'isGntScript x' tests whether @x@ is a valid Ganeti script
45 e4dac3e1 Jose A. Lopes
--
46 e4dac3e1 Jose A. Lopes
-- A valid Ganeti script is prefixed by "gnt-" and the rest of the
47 e4dac3e1 Jose A. Lopes
-- 'String' contains only alphabetic 'Char's.
48 e4dac3e1 Jose A. Lopes
isGntScript :: String -> Bool
49 e4dac3e1 Jose A. Lopes
isGntScript str =
50 e4dac3e1 Jose A. Lopes
  case span (/= '-') str of
51 e4dac3e1 Jose A. Lopes
    (x, '-':y) -> x == "gnt" && all Char.isAlpha y
52 e4dac3e1 Jose A. Lopes
    _ -> False
53 e4dac3e1 Jose A. Lopes
54 e4dac3e1 Jose A. Lopes
-- | 'isGroup x' tests whether @x@ is a valid group name
55 e4dac3e1 Jose A. Lopes
--
56 e4dac3e1 Jose A. Lopes
-- A valid group name name is an alphabetic 'String' possibly
57 e4dac3e1 Jose A. Lopes
-- containing '-'.
58 e4dac3e1 Jose A. Lopes
isGroup :: String -> Bool
59 e4dac3e1 Jose A. Lopes
isGroup = all (\c -> Char.isAlpha c || c == '-')
60 e4dac3e1 Jose A. Lopes
61 e4dac3e1 Jose A. Lopes
-- | 'isProgram x' tests whether @x@ is a valid program name
62 e4dac3e1 Jose A. Lopes
--
63 e4dac3e1 Jose A. Lopes
-- A valid program name is an alphabetic 'String'.
64 e4dac3e1 Jose A. Lopes
isProgram :: String -> Bool
65 e4dac3e1 Jose A. Lopes
isProgram = all Char.isAlpha
66 e4dac3e1 Jose A. Lopes
67 e4dac3e1 Jose A. Lopes
-- | 'isUser x' tests whether @x@ is a valid username
68 e4dac3e1 Jose A. Lopes
--
69 e4dac3e1 Jose A. Lopes
-- See 'isGroup'.
70 e4dac3e1 Jose A. Lopes
isUser :: String -> Bool
71 e4dac3e1 Jose A. Lopes
isUser = isGroup
72 e4dac3e1 Jose A. Lopes
73 e4dac3e1 Jose A. Lopes
case_versionSuffix :: Assertion
74 e4dac3e1 Jose A. Lopes
case_versionSuffix =
75 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
76 e4dac3e1 Jose A. Lopes
    "'versionSuffix' is invalid"
77 e4dac3e1 Jose A. Lopes
    (case AutoConf.versionSuffix of
78 e4dac3e1 Jose A. Lopes
        "" -> True
79 e4dac3e1 Jose A. Lopes
        '~':x -> not (null x)
80 e4dac3e1 Jose A. Lopes
        _ -> False)
81 e4dac3e1 Jose A. Lopes
82 e4dac3e1 Jose A. Lopes
case_localstatedir :: Assertion
83 e4dac3e1 Jose A. Lopes
case_localstatedir =
84 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
85 e4dac3e1 Jose A. Lopes
    "'localstatedir' is invalid"
86 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.localstatedir)
87 e4dac3e1 Jose A. Lopes
88 e4dac3e1 Jose A. Lopes
case_sysconfdir :: Assertion
89 e4dac3e1 Jose A. Lopes
case_sysconfdir =
90 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
91 e4dac3e1 Jose A. Lopes
    "'sysconfdir' is invalid"
92 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.sysconfdir)
93 e4dac3e1 Jose A. Lopes
94 e4dac3e1 Jose A. Lopes
case_sshConfigDir :: Assertion
95 e4dac3e1 Jose A. Lopes
case_sshConfigDir =
96 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
97 e4dac3e1 Jose A. Lopes
    "'sshConfigDir' is invalid"
98 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.sshConfigDir)
99 e4dac3e1 Jose A. Lopes
100 e4dac3e1 Jose A. Lopes
case_sshLoginUser :: Assertion
101 e4dac3e1 Jose A. Lopes
case_sshLoginUser =
102 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
103 e4dac3e1 Jose A. Lopes
    "'sshLoginUser' is invalid"
104 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.sshLoginUser)
105 e4dac3e1 Jose A. Lopes
106 e4dac3e1 Jose A. Lopes
case_sshConsoleUser :: Assertion
107 e4dac3e1 Jose A. Lopes
case_sshConsoleUser =
108 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
109 e4dac3e1 Jose A. Lopes
    "'sshConsoleUser' is invalid"
110 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.sshConsoleUser)
111 e4dac3e1 Jose A. Lopes
112 e4dac3e1 Jose A. Lopes
case_exportDir :: Assertion
113 e4dac3e1 Jose A. Lopes
case_exportDir =
114 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
115 e4dac3e1 Jose A. Lopes
    "'exportDir' is invalid"
116 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.exportDir)
117 e4dac3e1 Jose A. Lopes
118 e4dac3e1 Jose A. Lopes
case_osSearchPath :: Assertion
119 e4dac3e1 Jose A. Lopes
case_osSearchPath =
120 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
121 e4dac3e1 Jose A. Lopes
    "'osSearchPath' is invalid"
122 e4dac3e1 Jose A. Lopes
    (all isFilePath AutoConf.osSearchPath)
123 e4dac3e1 Jose A. Lopes
124 e4dac3e1 Jose A. Lopes
case_esSearchPath :: Assertion
125 e4dac3e1 Jose A. Lopes
case_esSearchPath =
126 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
127 e4dac3e1 Jose A. Lopes
    "'esSearchPath' is invalid"
128 e4dac3e1 Jose A. Lopes
    (all isFilePath AutoConf.esSearchPath)
129 e4dac3e1 Jose A. Lopes
130 e4dac3e1 Jose A. Lopes
case_xenBootloader :: Assertion
131 e4dac3e1 Jose A. Lopes
case_xenBootloader =
132 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
133 e4dac3e1 Jose A. Lopes
    "'xenBootloader' is invalid"
134 e4dac3e1 Jose A. Lopes
    (null AutoConf.xenBootloader || isFilePath AutoConf.xenBootloader)
135 e4dac3e1 Jose A. Lopes
136 e4dac3e1 Jose A. Lopes
case_xenConfigDir :: Assertion
137 e4dac3e1 Jose A. Lopes
case_xenConfigDir =
138 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
139 e4dac3e1 Jose A. Lopes
    "'xenConfigDir' is invalid"
140 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.xenConfigDir)
141 e4dac3e1 Jose A. Lopes
142 e4dac3e1 Jose A. Lopes
case_xenKernel :: Assertion
143 e4dac3e1 Jose A. Lopes
case_xenKernel =
144 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
145 e4dac3e1 Jose A. Lopes
    "'xenKernel' is invalid"
146 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.xenKernel)
147 e4dac3e1 Jose A. Lopes
148 e4dac3e1 Jose A. Lopes
case_xenInitrd :: Assertion
149 e4dac3e1 Jose A. Lopes
case_xenInitrd =
150 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
151 e4dac3e1 Jose A. Lopes
    "'xenInitrd' is invalid"
152 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.xenInitrd)
153 e4dac3e1 Jose A. Lopes
154 e4dac3e1 Jose A. Lopes
case_kvmKernel :: Assertion
155 e4dac3e1 Jose A. Lopes
case_kvmKernel =
156 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
157 e4dac3e1 Jose A. Lopes
    "'kvmKernel' is invalid"
158 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.kvmKernel)
159 e4dac3e1 Jose A. Lopes
160 e4dac3e1 Jose A. Lopes
case_iallocatorSearchPath :: Assertion
161 e4dac3e1 Jose A. Lopes
case_iallocatorSearchPath =
162 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
163 e4dac3e1 Jose A. Lopes
    "'iallocatorSearchPath' is invalid"
164 e4dac3e1 Jose A. Lopes
    (all isFilePath AutoConf.iallocatorSearchPath)
165 e4dac3e1 Jose A. Lopes
166 e4dac3e1 Jose A. Lopes
case_kvmPath :: Assertion
167 e4dac3e1 Jose A. Lopes
case_kvmPath =
168 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
169 e4dac3e1 Jose A. Lopes
    "'kvmPath' is invalid"
170 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.kvmPath)
171 e4dac3e1 Jose A. Lopes
172 e4dac3e1 Jose A. Lopes
case_ipPath :: Assertion
173 e4dac3e1 Jose A. Lopes
case_ipPath =
174 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
175 e4dac3e1 Jose A. Lopes
    "'ipPath' is invalid"
176 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.ipPath)
177 e4dac3e1 Jose A. Lopes
178 e4dac3e1 Jose A. Lopes
case_socatPath :: Assertion
179 e4dac3e1 Jose A. Lopes
case_socatPath =
180 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
181 e4dac3e1 Jose A. Lopes
    "'socatPath' is invalid"
182 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.socatPath)
183 e4dac3e1 Jose A. Lopes
184 e4dac3e1 Jose A. Lopes
case_toolsdir :: Assertion
185 e4dac3e1 Jose A. Lopes
case_toolsdir =
186 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
187 e4dac3e1 Jose A. Lopes
    "'toolsdir' is invalid"
188 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.toolsdir)
189 e4dac3e1 Jose A. Lopes
190 e4dac3e1 Jose A. Lopes
case_gntScripts :: Assertion
191 e4dac3e1 Jose A. Lopes
case_gntScripts =
192 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
193 e4dac3e1 Jose A. Lopes
    "'gntScripts' is invalid"
194 e4dac3e1 Jose A. Lopes
    (all isGntScript AutoConf.gntScripts)
195 e4dac3e1 Jose A. Lopes
196 e4dac3e1 Jose A. Lopes
case_htoolsProgs :: Assertion
197 e4dac3e1 Jose A. Lopes
case_htoolsProgs =
198 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
199 e4dac3e1 Jose A. Lopes
    "'htoolsProgs' is invalid"
200 e4dac3e1 Jose A. Lopes
    (all isProgram AutoConf.htoolsProgs)
201 e4dac3e1 Jose A. Lopes
202 e4dac3e1 Jose A. Lopes
case_pkglibdir :: Assertion
203 e4dac3e1 Jose A. Lopes
case_pkglibdir =
204 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
205 e4dac3e1 Jose A. Lopes
    "'pkglibdir' is invalid"
206 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.pkglibdir)
207 e4dac3e1 Jose A. Lopes
208 e4dac3e1 Jose A. Lopes
case_sharedir :: Assertion
209 e4dac3e1 Jose A. Lopes
case_sharedir =
210 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
211 e4dac3e1 Jose A. Lopes
    "'sharedir' is invalid"
212 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.sharedir)
213 e4dac3e1 Jose A. Lopes
214 e4dac3e1 Jose A. Lopes
case_versionedsharedir :: Assertion
215 e4dac3e1 Jose A. Lopes
case_versionedsharedir =
216 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
217 e4dac3e1 Jose A. Lopes
    "'versionedsharedir' is invalid"
218 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.versionedsharedir)
219 e4dac3e1 Jose A. Lopes
220 e4dac3e1 Jose A. Lopes
case_drbdBarriers :: Assertion
221 e4dac3e1 Jose A. Lopes
case_drbdBarriers =
222 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
223 e4dac3e1 Jose A. Lopes
    "'drbdBarriers' is invalid"
224 e4dac3e1 Jose A. Lopes
    (AutoConf.drbdBarriers `elem` ["n", "bf"])
225 e4dac3e1 Jose A. Lopes
226 e4dac3e1 Jose A. Lopes
case_syslogUsage :: Assertion
227 e4dac3e1 Jose A. Lopes
case_syslogUsage =
228 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
229 e4dac3e1 Jose A. Lopes
    "'syslogUsage' is invalid"
230 e4dac3e1 Jose A. Lopes
    (AutoConf.syslogUsage `elem` ["no", "yes", "only"])
231 e4dac3e1 Jose A. Lopes
232 e4dac3e1 Jose A. Lopes
case_daemonsGroup :: Assertion
233 e4dac3e1 Jose A. Lopes
case_daemonsGroup =
234 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
235 e4dac3e1 Jose A. Lopes
    "'daemonsGroup' is invalid"
236 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.daemonsGroup)
237 e4dac3e1 Jose A. Lopes
238 e4dac3e1 Jose A. Lopes
case_adminGroup :: Assertion
239 e4dac3e1 Jose A. Lopes
case_adminGroup =
240 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
241 e4dac3e1 Jose A. Lopes
    "'adminGroup' is invalid"
242 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.adminGroup)
243 e4dac3e1 Jose A. Lopes
244 e4dac3e1 Jose A. Lopes
case_masterdUser :: Assertion
245 e4dac3e1 Jose A. Lopes
case_masterdUser =
246 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
247 e4dac3e1 Jose A. Lopes
    "'masterdUser' is invalid"
248 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.masterdUser)
249 e4dac3e1 Jose A. Lopes
250 e4dac3e1 Jose A. Lopes
case_masterdGroup :: Assertion
251 e4dac3e1 Jose A. Lopes
case_masterdGroup =
252 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
253 e4dac3e1 Jose A. Lopes
    "'masterdGroup' is invalid"
254 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.masterdGroup)
255 e4dac3e1 Jose A. Lopes
256 e4dac3e1 Jose A. Lopes
case_rapiUser :: Assertion
257 e4dac3e1 Jose A. Lopes
case_rapiUser =
258 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
259 e4dac3e1 Jose A. Lopes
    "'rapiUser' is invalid"
260 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.rapiUser)
261 e4dac3e1 Jose A. Lopes
262 e4dac3e1 Jose A. Lopes
case_rapiGroup :: Assertion
263 e4dac3e1 Jose A. Lopes
case_rapiGroup =
264 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
265 e4dac3e1 Jose A. Lopes
    "'rapiGroup' is invalid"
266 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.rapiGroup)
267 e4dac3e1 Jose A. Lopes
268 e4dac3e1 Jose A. Lopes
case_confdUser :: Assertion
269 e4dac3e1 Jose A. Lopes
case_confdUser =
270 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
271 e4dac3e1 Jose A. Lopes
    "'confdUser' is invalid"
272 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.confdUser)
273 e4dac3e1 Jose A. Lopes
274 e4dac3e1 Jose A. Lopes
case_confdGroup :: Assertion
275 e4dac3e1 Jose A. Lopes
case_confdGroup =
276 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
277 e4dac3e1 Jose A. Lopes
    "'confdGroup' is invalid"
278 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.confdGroup)
279 e4dac3e1 Jose A. Lopes
280 e4dac3e1 Jose A. Lopes
case_luxidUser :: Assertion
281 e4dac3e1 Jose A. Lopes
case_luxidUser =
282 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
283 e4dac3e1 Jose A. Lopes
    "'luxidUser' is invalid"
284 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.luxidUser)
285 e4dac3e1 Jose A. Lopes
286 e4dac3e1 Jose A. Lopes
case_luxidGroup :: Assertion
287 e4dac3e1 Jose A. Lopes
case_luxidGroup =
288 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
289 e4dac3e1 Jose A. Lopes
    "'luxidGroup' is invalid"
290 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.luxidGroup)
291 e4dac3e1 Jose A. Lopes
292 e4dac3e1 Jose A. Lopes
case_nodedUser :: Assertion
293 e4dac3e1 Jose A. Lopes
case_nodedUser =
294 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
295 e4dac3e1 Jose A. Lopes
    "'nodedUser' is invalid"
296 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.nodedUser)
297 e4dac3e1 Jose A. Lopes
298 e4dac3e1 Jose A. Lopes
case_nodedGroup :: Assertion
299 e4dac3e1 Jose A. Lopes
case_nodedGroup =
300 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
301 e4dac3e1 Jose A. Lopes
    "'nodedGroup' is invalid"
302 e4dac3e1 Jose A. Lopes
    (isGroup AutoConf.nodedGroup)
303 e4dac3e1 Jose A. Lopes
304 e4dac3e1 Jose A. Lopes
case_mondUser :: Assertion
305 e4dac3e1 Jose A. Lopes
case_mondUser =
306 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
307 e4dac3e1 Jose A. Lopes
    "'mondUser' is invalid"
308 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.mondUser)
309 e4dac3e1 Jose A. Lopes
310 e4dac3e1 Jose A. Lopes
case_mondGroup :: Assertion
311 e4dac3e1 Jose A. Lopes
case_mondGroup =
312 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
313 e4dac3e1 Jose A. Lopes
    "'mondGroup' is invalid"
314 e4dac3e1 Jose A. Lopes
    (isUser AutoConf.mondGroup)
315 e4dac3e1 Jose A. Lopes
316 e4dac3e1 Jose A. Lopes
case_diskSeparator :: Assertion
317 e4dac3e1 Jose A. Lopes
case_diskSeparator =
318 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
319 e4dac3e1 Jose A. Lopes
    "'diskSeparator' is invalid"
320 e4dac3e1 Jose A. Lopes
    (not (null AutoConf.diskSeparator))
321 e4dac3e1 Jose A. Lopes
322 e4dac3e1 Jose A. Lopes
case_qemuimgPath :: Assertion
323 e4dac3e1 Jose A. Lopes
case_qemuimgPath =
324 e4dac3e1 Jose A. Lopes
  HUnit.assertBool
325 e4dac3e1 Jose A. Lopes
    "'qemuimgPath' is invalid"
326 e4dac3e1 Jose A. Lopes
    (isFilePath AutoConf.qemuimgPath)
327 e4dac3e1 Jose A. Lopes
328 e4dac3e1 Jose A. Lopes
TestHelper.testSuite "AutoConf"
329 e4dac3e1 Jose A. Lopes
  [ 'case_versionSuffix
330 e4dac3e1 Jose A. Lopes
  , 'case_localstatedir
331 e4dac3e1 Jose A. Lopes
  , 'case_sysconfdir
332 e4dac3e1 Jose A. Lopes
  , 'case_sshConfigDir
333 e4dac3e1 Jose A. Lopes
  , 'case_sshLoginUser
334 e4dac3e1 Jose A. Lopes
  , 'case_sshConsoleUser
335 e4dac3e1 Jose A. Lopes
  , 'case_exportDir
336 e4dac3e1 Jose A. Lopes
  , 'case_osSearchPath
337 e4dac3e1 Jose A. Lopes
  , 'case_esSearchPath
338 e4dac3e1 Jose A. Lopes
  , 'case_xenBootloader
339 e4dac3e1 Jose A. Lopes
  , 'case_xenConfigDir
340 e4dac3e1 Jose A. Lopes
  , 'case_xenKernel
341 e4dac3e1 Jose A. Lopes
  , 'case_xenInitrd
342 e4dac3e1 Jose A. Lopes
  , 'case_kvmKernel
343 e4dac3e1 Jose A. Lopes
  , 'case_iallocatorSearchPath
344 e4dac3e1 Jose A. Lopes
  , 'case_kvmPath
345 e4dac3e1 Jose A. Lopes
  , 'case_ipPath
346 e4dac3e1 Jose A. Lopes
  , 'case_socatPath
347 e4dac3e1 Jose A. Lopes
  , 'case_toolsdir
348 e4dac3e1 Jose A. Lopes
  , 'case_gntScripts
349 e4dac3e1 Jose A. Lopes
  , 'case_htoolsProgs
350 e4dac3e1 Jose A. Lopes
  , 'case_pkglibdir
351 e4dac3e1 Jose A. Lopes
  , 'case_sharedir
352 e4dac3e1 Jose A. Lopes
  , 'case_versionedsharedir
353 e4dac3e1 Jose A. Lopes
  , 'case_drbdBarriers
354 e4dac3e1 Jose A. Lopes
  , 'case_syslogUsage
355 e4dac3e1 Jose A. Lopes
  , 'case_daemonsGroup
356 e4dac3e1 Jose A. Lopes
  , 'case_adminGroup
357 e4dac3e1 Jose A. Lopes
  , 'case_masterdUser
358 e4dac3e1 Jose A. Lopes
  , 'case_masterdGroup
359 e4dac3e1 Jose A. Lopes
  , 'case_rapiUser
360 e4dac3e1 Jose A. Lopes
  , 'case_rapiGroup
361 e4dac3e1 Jose A. Lopes
  , 'case_confdUser
362 e4dac3e1 Jose A. Lopes
  , 'case_confdGroup
363 e4dac3e1 Jose A. Lopes
  , 'case_luxidUser
364 e4dac3e1 Jose A. Lopes
  , 'case_luxidGroup
365 e4dac3e1 Jose A. Lopes
  , 'case_nodedUser
366 e4dac3e1 Jose A. Lopes
  , 'case_nodedGroup
367 e4dac3e1 Jose A. Lopes
  , 'case_mondUser
368 e4dac3e1 Jose A. Lopes
  , 'case_mondGroup
369 e4dac3e1 Jose A. Lopes
  , 'case_diskSeparator
370 e4dac3e1 Jose A. Lopes
  , 'case_qemuimgPath ]