summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Belu <cbelu@cloudbasesolutions.com>2017-09-06 09:15:36 -0700
committerClaudiu Belu <cbelu@cloudbasesolutions.com>2017-09-07 11:36:45 +0000
commit975fe2382dd42cbdcaa9620c3f29693040c6681f (patch)
treeafca210795dc93d9c08ef6b22c41fa5a068cd4e5
parent49f63c77d3ebf5c18f874f63ab10cb159969dce6 (diff)
Deduplicates optional_feature tests
The optional_feature mixin's tests can use the _check_resize helper method, reducing the code duplication. Change-Id: I3e3c9be1fe5ba3629e9c7b8db4917c421ce7bd71
Notes
Notes (review): Code-Review+2: Claudiu Belu <cbelu@cloudbasesolutions.com> Workflow+1: Claudiu Belu <cbelu@cloudbasesolutions.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 07 Sep 2017 12:09:59 +0000 Reviewed-on: https://review.openstack.org/501632 Project: openstack/oswin-tempest-plugin Branch: refs/heads/master
-rw-r--r--oswin_tempest_plugin/tests/_mixins/optional_feature.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/oswin_tempest_plugin/tests/_mixins/optional_feature.py b/oswin_tempest_plugin/tests/_mixins/optional_feature.py
index 9a5189b..11651ee 100644
--- a/oswin_tempest_plugin/tests/_mixins/optional_feature.py
+++ b/oswin_tempest_plugin/tests/_mixins/optional_feature.py
@@ -77,14 +77,10 @@ class _OptionalFeatureMixin(resize._ResizeUtils):
77 'Resize is not available.') 77 'Resize is not available.')
78 def test_resize_add_feature(self): 78 def test_resize_add_feature(self):
79 new_flavor = self._get_flavor_ref() 79 new_flavor = self._get_flavor_ref()
80 server_tuple = self._create_server(self._FLAVOR_REF) 80 self._check_resize(new_flavor, self._FLAVOR_REF)
81 self._resize_server(server_tuple, new_flavor)
82 self._check_server_connectivity(server_tuple)
83 81
84 @testtools.skipUnless(CONF.compute_feature_enabled.resize, 82 @testtools.skipUnless(CONF.compute_feature_enabled.resize,
85 'Resize is not available.') 83 'Resize is not available.')
86 def test_resize_remove_feature(self): 84 def test_resize_remove_feature(self):
87 vanilla_flavor = self._FLAVOR_REF 85 new_flavor = self._get_flavor_ref()
88 server_tuple = self._create_server() 86 self._check_resize(self._FLAVOR_REF, new_flavor)
89 self._resize_server(server_tuple, vanilla_flavor)
90 self._check_server_connectivity(server_tuple)