Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
c15f7183
Commit
c15f7183
authored
15 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Style change: camel-casing of unittests
parent
f5b553da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Ganeti/HTools/QC.hs
+12
-12
12 additions, 12 deletions
Ganeti/HTools/QC.hs
test.hs
+6
-6
6 additions, 6 deletions
test.hs
with
18 additions
and
18 deletions
Ganeti/HTools/QC.hs
+
12
−
12
View file @
c15f7183
...
...
@@ -24,12 +24,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module
Ganeti.HTools.QC
(
test
_
PeerMap
,
test
_
Container
,
test
_
Instance
,
test
_
Node
,
test
_
Text
,
test
_
Cluster
(
testPeerMap
,
testContainer
,
testInstance
,
testNode
,
testText
,
testCluster
)
where
import
Test.QuickCheck
...
...
@@ -122,7 +122,7 @@ prop_PeerMap_maxElem pmap =
where
_types
=
pmap
::
PeerMap
.
PeerMap
puniq
=
PeerMap
.
accumArray
const
pmap
test
_
PeerMap
=
testPeerMap
=
[
run
prop_PeerMap_addIdempotent
,
run
prop_PeerMap_removeIdempotent
,
run
prop_PeerMap_maxElem
...
...
@@ -140,7 +140,7 @@ prop_Container_addTwo cdata i1 i2 =
cont
=
foldl
(
\
c
x
->
Container
.
add
x
x
c
)
Container
.
empty
cdata
fn
x1
x2
=
Container
.
addTwo
x1
x1
x2
x2
test
_
Container
=
testContainer
=
[
run
prop_Container_addTwo
]
-- Simple instance tests, we only have setter/getters
...
...
@@ -178,7 +178,7 @@ prop_Instance_runStatus_False inst =
in
run_tx
/=
"running"
&&
run_tx
/=
"ERROR_up"
==>
run_st
==
False
test
_
Instance
=
testInstance
=
[
run
prop_Instance_setIdx
,
run
prop_Instance_setName
,
run
prop_Instance_setPri
...
...
@@ -216,7 +216,7 @@ prop_Text_Load_Instance name mem dsk vcpus status pnode snode pdx sdx =
Instance
.
pNode
i
==
pdx
&&
Instance
.
sNode
i
==
rsdx
)
test
_
Text
=
testText
=
[
run
prop_Text_Load_Instance
]
...
...
@@ -239,7 +239,7 @@ prop_Node_addSec node inst pdx =
==>
isFailure
(
Node
.
addSec
node
inst
pdx
)
where
_types
=
(
node
::
Node
.
Node
,
inst
::
Instance
.
Instance
,
pdx
::
Int
)
test
_
Node
=
testNode
=
[
run
prop_Node_addPri
,
run
prop_Node_addSec
]
...
...
@@ -259,6 +259,6 @@ prop_Score_Zero node count =
-- this should be much lower than the default score in CLI.hs
in
score
<=
1e-15
test
_
Cluster
=
testCluster
=
[
run
prop_Score_Zero
]
This diff is collapsed.
Click to expand it.
test.hs
+
6
−
6
View file @
c15f7183
...
...
@@ -59,12 +59,12 @@ main :: IO ()
main
=
do
errs
<-
newIORef
0
let
wrap
lst
=
map
(
wrapTest
errs
)
lst
runTests
"PeerMap"
options
$
wrap
test
_
PeerMap
runTests
"Container"
options
$
wrap
test
_
Container
runTests
"Instance"
options
$
wrap
test
_
Instance
runTests
"Node"
options
$
wrap
test
_
Node
runTests
"Text"
options
$
wrap
test
_
Text
runTests
"Cluster"
options
$
wrap
test
_
Cluster
runTests
"PeerMap"
options
$
wrap
testPeerMap
runTests
"Container"
options
$
wrap
testContainer
runTests
"Instance"
options
$
wrap
testInstance
runTests
"Node"
options
$
wrap
testNode
runTests
"Text"
options
$
wrap
testText
runTests
"Cluster"
options
$
wrap
testCluster
terr
<-
readIORef
errs
(
if
(
terr
>
0
)
then
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment