Disable test_create_cluster_with_zero_nodes

Cluster creation fails on the CI due to an issue similar to what we've
seen before for another test (test_create_list_sign_delete_clusters).
Disable it for now.

story: 2007272
task: 38867

story: 2007851
task: 41443

Change-Id: Ie91fdfe71058b45c5fd1217920b8b5b993e47734
This commit is contained in:
Bharat Kunwar 2020-02-25 16:00:47 +00:00 committed by Bharat Kunwar
parent 487571aa0c
commit b68a678f37
3 changed files with 19 additions and 7 deletions

View File

@ -22,7 +22,7 @@
vars:
tox_envlist: all
tempest_test_regex: ^magnum_tempest_plugin.tests.api
tempest_black_regex: ^magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_list_sign_delete_clusters
tempest_black_regex: (test_create_list_sign_delete_clusters|test_create_cluster_with_zero_nodes)
devstack_local_conf:
test-config:
$TEMPEST_CONFIG:

View File

@ -167,7 +167,13 @@ class ClusterClient(client.MagnumClient):
def does_cluster_not_exist(self, cluster_id):
try:
self.get_cluster(cluster_id)
resp, model = self.get_cluster(cluster_id)
if model.status in ['ERROR', 'DELETE_FAILED']:
self.LOG.error('Cluster %s is in failed state, status_reason: '
'%s', cluster_id, model.status_reason)
raise exceptions.ServerFault(
"Got into an error condition: %s for %s" %
(model.status, cluster_id))
except exceptions.NotFound:
self.LOG.warning('Cluster %s is not found.', cluster_id)
return True

View File

@ -224,14 +224,20 @@ Q0uA0aVog3f5iJxCa3Hp5gxbJQ6zV6kJ0TEsuaaOhEko9sdpCoPOnRBm2i/XRD2D
exceptions.BadRequest,
self.cluster_client.post_cluster, gen_model)
@testtools.testcase.attr('negative')
@testtools.testcase.attr('positive')
@testtools.testcase.attr('slow')
@decorators.idempotent_id('262eb132-a857-11e9-9382-00224d6b7bc1')
def test_create_cluster_with_node_count_0(self):
def test_create_cluster_with_zero_nodes(self):
gen_model = datagen.valid_cluster_data(
cluster_template_id=self.cluster_template.uuid, node_count=0)
self.assertRaises(
exceptions.BadRequest,
self.cluster_client.post_cluster, gen_model)
# test cluster create
_, cluster_model = self._create_cluster(gen_model)
self.assertNotIn('status', cluster_model)
# test cluster delete
self._delete_cluster(cluster_model.uuid)
self.clusters.remove(cluster_model.uuid)
@testtools.testcase.attr('negative')
@decorators.idempotent_id('29c6c5f0-a857-11e9-9382-00224d6b7bc1')