Merge "Fixed tests failures when SKIP_ALL_TESTS_FOR_PLUGIN=True"
This commit is contained in:
commit
2984d3c8da
|
@ -14,7 +14,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
from testtools import testcase
|
||||
import unittest2
|
||||
|
||||
from sahara.openstack.common import excutils
|
||||
from sahara.tests.integration.configs import config as cfg
|
||||
|
@ -35,8 +34,8 @@ class HDPGatingTest(cinder.CinderVolumeTest, edp.EDPTest,
|
|||
SKIP_SWIFT_TEST = config.SKIP_SWIFT_TEST
|
||||
SKIP_SCALING_TEST = config.SKIP_SCALING_TEST
|
||||
|
||||
@unittest2.skipIf(config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
'All tests for HDP plugin were skipped')
|
||||
@testcase.skipIf(config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
'All tests for HDP plugin were skipped')
|
||||
@testcase.attr('hdp')
|
||||
def test_hdp_plugin_gating(self):
|
||||
self.hdp_config.IMAGE_ID, self.hdp_config.SSH_USERNAME = (
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
from testtools import testcase
|
||||
import unittest2
|
||||
|
||||
from sahara.tests.integration.configs import config as cfg
|
||||
from sahara.tests.integration.tests import base as b
|
||||
|
@ -36,7 +35,11 @@ class IDH2GatingTest(cluster_configs.ClusterConfigTest, edp.EDPTest,
|
|||
|
||||
def setUp(self):
|
||||
super(IDH2GatingTest, self).setUp()
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
|
||||
def _prepare_test(self):
|
||||
self.floating_ip_pool = self.common_config.FLOATING_IP_POOL
|
||||
self.internal_neutron_net = None
|
||||
if self.common_config.NEUTRON_ENABLED:
|
||||
|
@ -44,9 +47,6 @@ class IDH2GatingTest(cluster_configs.ClusterConfigTest, edp.EDPTest,
|
|||
self.floating_ip_pool = \
|
||||
self.get_floating_ip_pool_id_for_neutron_net()
|
||||
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
self.idh2_config.IMAGE_ID, self.idh2_config.SSH_USERNAME = (
|
||||
self.get_image_id_and_ssh_username(self.idh2_config))
|
||||
|
||||
|
@ -216,10 +216,12 @@ class IDH2GatingTest(cluster_configs.ClusterConfigTest, edp.EDPTest,
|
|||
if not self.idh2_config.SKIP_SCALING_TEST:
|
||||
self.check_swift_availability(self.cluster_info)
|
||||
|
||||
@unittest2.skipIf(cfg.ITConfig().idh2_config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
"All tests for Intel plugin were skipped")
|
||||
@testcase.skipIf(cfg.ITConfig().idh2_config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
"All tests for Intel plugin were skipped")
|
||||
@testcase.attr('idh2')
|
||||
def test_idh_plugin_gating(self):
|
||||
self._prepare_test()
|
||||
|
||||
self._create_tt_dn_ng_template()
|
||||
self._create_tt_ng_template()
|
||||
self._create_dn_ng_template()
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
from testtools import testcase
|
||||
import unittest2
|
||||
|
||||
from sahara.tests.integration.configs import config as cfg
|
||||
from sahara.tests.integration.tests import base
|
||||
|
@ -32,6 +31,11 @@ class IDH3GatingTest(swift.SwiftTest,
|
|||
def setUp(self):
|
||||
super(IDH3GatingTest, self).setUp()
|
||||
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
|
||||
def _prepare_test(self):
|
||||
self.idh3_config = cfg.ITConfig().idh3_config
|
||||
self.floating_ip_pool = self.common_config.FLOATING_IP_POOL
|
||||
self.internal_neutron_net = None
|
||||
|
@ -40,9 +44,6 @@ class IDH3GatingTest(swift.SwiftTest,
|
|||
self.floating_ip_pool = \
|
||||
self.get_floating_ip_pool_id_for_neutron_net()
|
||||
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
self.idh3_config.IMAGE_ID, self.idh3_config.SSH_USERNAME = (
|
||||
self.get_image_id_and_ssh_username(self.idh3_config))
|
||||
|
||||
|
@ -202,10 +203,11 @@ class IDH3GatingTest(swift.SwiftTest,
|
|||
if not self.idh3_config.SKIP_SCALING_TEST:
|
||||
self.check_swift_availability(self.cluster_info)
|
||||
|
||||
@unittest2.skipIf(cfg.ITConfig().idh3_config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
"All tests for Intel plugin were skipped")
|
||||
@testcase.skipIf(cfg.ITConfig().idh3_config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
"All tests for Intel plugin were skipped")
|
||||
@testcase.attr('idh3')
|
||||
def test_idh_plugin_gating(self):
|
||||
self._prepare_test()
|
||||
self._create_tt_dn_ng_template()
|
||||
self._create_tt_ng_template()
|
||||
self._create_dn_ng_template()
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
from testtools import testcase
|
||||
import unittest2
|
||||
|
||||
from sahara.openstack.common import excutils
|
||||
from sahara.tests.integration.configs import config as cfg
|
||||
|
@ -41,8 +40,8 @@ class VanillaGatingTest(cinder.CinderVolumeTest,
|
|||
SKIP_SCALING_TEST = config.SKIP_SCALING_TEST
|
||||
SKIP_TRANSIENT_CLUSTER_TEST = config.SKIP_TRANSIENT_CLUSTER_TEST
|
||||
|
||||
@unittest2.skipIf(config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
'All tests for Vanilla plugin were skipped')
|
||||
@testcase.skipIf(config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
'All tests for Vanilla plugin were skipped')
|
||||
@testcase.attr('vanilla1', 'transient')
|
||||
def test_vanilla_plugin_gating(self):
|
||||
self.vanilla_config.IMAGE_ID, self.vanilla_config.SSH_USERNAME = (
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
from testtools import testcase
|
||||
import unittest2
|
||||
|
||||
from sahara.tests.integration.configs import config as cfg
|
||||
from sahara.tests.integration.tests import base as b
|
||||
|
@ -41,7 +40,11 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
|
|||
|
||||
def setUp(self):
|
||||
super(VanillaTwoGatingTest, self).setUp()
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
|
||||
def _prepare_test(self):
|
||||
self.vanilla_two_config = cfg.ITConfig().vanilla_two_config
|
||||
self.floating_ip_pool = self.common_config.FLOATING_IP_POOL
|
||||
self.internal_neutron_net = None
|
||||
|
@ -50,9 +53,6 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
|
|||
self.floating_ip_pool = \
|
||||
self.get_floating_ip_pool_id_for_neutron_net()
|
||||
|
||||
self.cluster_id = None
|
||||
self.cluster_template_id = None
|
||||
self.ng_template_ids = []
|
||||
self.vanilla_two_config.IMAGE_ID, self.vanilla_two_config.SSH_USERNAME\
|
||||
= (self.get_image_id_and_ssh_username(self.vanilla_two_config))
|
||||
|
||||
|
@ -278,11 +278,12 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
|
|||
def _check_edp_after_scaling(self):
|
||||
self._edp_test()
|
||||
|
||||
@unittest2.skipIf(
|
||||
@testcase.skipIf(
|
||||
cfg.ITConfig().vanilla_two_config.SKIP_ALL_TESTS_FOR_PLUGIN,
|
||||
"All tests for Vanilla plugin were skipped")
|
||||
@testcase.attr('vanilla2')
|
||||
def test_vanilla_two_plugin_gating(self):
|
||||
self._prepare_test()
|
||||
self._create_nm_dn_ng_template()
|
||||
self._create_nm_ng_template()
|
||||
self._create_dn_ng_template()
|
||||
|
|
Loading…
Reference in New Issue