Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2a45d4dc
authored
Sep 24, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix tests to match new allocate_node
parent
e445a532
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
circle/vm/tests/test_models.py
+3
-6
No files found.
circle/vm/tests/test_models.py
View file @
2a45d4dc
...
...
@@ -112,8 +112,7 @@ class InstanceTestCase(TestCase):
migrate_op
(
system
=
True
)
migr
.
apply_async
.
assert_called
()
self
.
assertIn
(
call
.
sub_activity
(
u'scheduling'
,
readable_name
=
u'schedule'
),
act
.
mock_calls
)
inst
.
allocate_node
.
assert_called
()
inst
.
select_node
.
assert_called
()
def
test_migrate_wo_scheduling
(
self
):
...
...
@@ -130,7 +129,7 @@ class InstanceTestCase(TestCase):
migrate_op
(
to_node
=
inst
.
node
,
system
=
True
)
migr
.
apply_async
.
assert_called
()
self
.
assertNotIn
(
call
.
sub_activity
(
u'scheduling'
),
act
.
mock_calls
)
inst
.
allocate_node
.
assert_called
(
)
def
test_migrate_with_error
(
self
):
inst
=
Mock
(
destroyed_at
=
None
,
spec
=
Instance
)
...
...
@@ -149,11 +148,9 @@ class InstanceTestCase(TestCase):
migr
.
apply_async
.
assert_called
()
self
.
assertIn
(
call
.
sub_activity
(
u'scheduling'
,
readable_name
=
u'schedule'
),
act
.
mock_calls
)
self
.
assertIn
(
call
.
sub_activity
(
u'rollback_net'
,
readable_name
=
u'redeploy network (rollback)'
),
act
.
mock_calls
)
inst
.
select
_node
.
assert_called
()
inst
.
allocate
_node
.
assert_called
()
def
test_status_icon
(
self
):
inst
=
MagicMock
(
spec
=
Instance
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment