Skip to content

Commit 90e1383

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Improve prep_resize reschedule unit test"
2 parents 4d2d924 + be9fe5c commit 90e1383

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nova/tests/unit/compute/test_compute_mgr.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10644,6 +10644,7 @@ def doit(mock_pr, mock_r):
1064410644
self._mock_rt().reportclient = reportclient
1064510645
mock_pr.side_effect = test.TestingException
1064610646
mock_r.side_effect = test.TestingException
10647+
request_spec = objects.RequestSpec()
1064710648

1064810649
instance = objects.Instance(uuid=uuids.instance,
1064910650
id=1,
@@ -10656,7 +10657,7 @@ def doit(mock_pr, mock_r):
1065610657
self.compute.prep_resize,
1065710658
self.context, mock.sentinel.image,
1065810659
instance, flavor,
10659-
mock.sentinel.request_spec,
10660+
request_spec,
1066010661
{}, 'node', False,
1066110662
migration, [])
1066210663

@@ -10666,7 +10667,11 @@ def doit(mock_pr, mock_r):
1066610667
migration.save.assert_called_once_with()
1066710668
mock_r.assert_called_once_with(
1066810669
self.context, instance, mock.ANY, flavor,
10669-
mock.sentinel.request_spec, {}, [])
10670+
request_spec, {}, [])
10671+
mock_pr.assert_called_once_with(
10672+
self.context, mock.sentinel.image,
10673+
instance, flavor, {}, 'node', migration,
10674+
request_spec, False)
1067010675
mock_notify_resize.assert_has_calls([
1067110676
mock.call(self.context, instance, 'fake-mini',
1067210677
'start', flavor),

0 commit comments

Comments
 (0)