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
fafa5990
Commit
fafa5990
authored
17 years ago
by
Alexander Schreiber
Browse files
Options
Downloads
Patches
Plain Diff
Fix unit tests for hooks.
Reviewed-by: imsnah
parent
6a438c98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/ganeti.hooks_unittest.py
+4
-4
4 additions, 4 deletions
test/ganeti.hooks_unittest.py
with
4 additions
and
4 deletions
test/ganeti.hooks_unittest.py
+
4
−
4
View file @
fafa5990
...
...
@@ -231,7 +231,7 @@ class TestHooksMaster(unittest.TestCase):
sstore
=
FakeSStore
()
op
=
opcodes
.
OpCode
()
lu
=
FakeLU
(
None
,
op
,
cfg
,
sstore
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_false
,
cfg
,
sstore
,
lu
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_false
,
lu
)
self
.
failUnlessRaises
(
errors
.
HooksFailure
,
hm
.
RunPhase
,
constants
.
HOOKS_PHASE_PRE
)
hm
.
RunPhase
(
constants
.
HOOKS_PHASE_POST
)
...
...
@@ -242,7 +242,7 @@ class TestHooksMaster(unittest.TestCase):
sstore
=
FakeSStore
()
op
=
opcodes
.
OpCode
()
lu
=
FakeLU
(
None
,
op
,
cfg
,
sstore
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_nodes_false
,
cfg
,
sstore
,
lu
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_nodes_false
,
lu
)
self
.
failUnlessRaises
(
errors
.
HooksFailure
,
hm
.
RunPhase
,
constants
.
HOOKS_PHASE_PRE
)
hm
.
RunPhase
(
constants
.
HOOKS_PHASE_POST
)
...
...
@@ -253,7 +253,7 @@ class TestHooksMaster(unittest.TestCase):
op
=
opcodes
.
OpCode
()
sstore
=
FakeSStore
()
lu
=
FakeLU
(
None
,
op
,
cfg
,
sstore
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_script_fail
,
cfg
,
sstore
,
lu
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_script_fail
,
lu
)
self
.
failUnlessRaises
(
errors
.
HooksAbort
,
hm
.
RunPhase
,
constants
.
HOOKS_PHASE_PRE
)
hm
.
RunPhase
(
constants
.
HOOKS_PHASE_POST
)
...
...
@@ -264,7 +264,7 @@ class TestHooksMaster(unittest.TestCase):
op
=
opcodes
.
OpCode
()
sstore
=
FakeSStore
()
lu
=
FakeLU
(
None
,
op
,
cfg
,
sstore
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_script_succeed
,
cfg
,
sstore
,
lu
)
hm
=
mcpu
.
HooksMaster
(
self
.
_call_script_succeed
,
lu
)
for
phase
in
(
constants
.
HOOKS_PHASE_PRE
,
constants
.
HOOKS_PHASE_POST
):
hm
.
RunPhase
(
phase
)
...
...
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