summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-20 15:28:25 +0000
committerGerrit Code Review <review@openstack.org>2017-07-20 15:28:25 +0000
commit712b533dd0caf7c81f62a49cbce7f34a29cadd7f (patch)
tree65bcdc987ff945b63df6f175de1481006ee6df4f
parent1945d1c3bc9eda347014c1283f4c7511f6b8ad90 (diff)
parent617eb742ab9426a769e9859b569b54b260025a39 (diff)
downloadpython-novaclient-712b533dd0caf7c81f62a49cbce7f34a29cadd7f.tar.gz
Merge "Adjust test_resize_down_revert to account for counting quotas"
-rw-r--r--novaclient/tests/functional/v2/test_resize.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/novaclient/tests/functional/v2/test_resize.py b/novaclient/tests/functional/v2/test_resize.py
index 25526024..9277480e 100644
--- a/novaclient/tests/functional/v2/test_resize.py
+++ b/novaclient/tests/functional/v2/test_resize.py
@@ -135,17 +135,16 @@ class TestServersResize(base.ClientTestBase):
self.nova('resize',
params='%s %s --poll' % (server_id, smaller_flavor))
resize_usage = self._get_absolute_limits()
- # compare the starting usage against the resize usage; in the case of
- # a resize down we don't expect usage to change until it's confirmed,
- # which doesn't happen in this test since we revert
- self._compare_quota_usage(
- starting_usage, resize_usage, expect_diff=False)
+ # compare the starting usage against the resize usage; with counting
+ # quotas in the server there are no reservations, so the
+ # usage changes after the resize happens before it's confirmed.
+ self._compare_quota_usage(starting_usage, resize_usage)
# now revert the resize
self.nova('resize-revert', params='%s' % server_id)
# we have to wait for the server to be ACTIVE before we can check quota
self._wait_for_state_change(server_id, 'active')
- # get the final quota usage which should be the same as the resize
- # usage before revert
+ # get the final quota usage which will be different from the resize
+ # usage since we've reverted back *up* to the original flavor; the API
+ # code checks quota again if we revert up in size
revert_usage = self._get_absolute_limits()
- self._compare_quota_usage(
- resize_usage, revert_usage, expect_diff=False)
+ self._compare_quota_usage(resize_usage, revert_usage)