Browse Source

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
changes/66/709766/19
Bharat Kunwar 1 year ago
committed by Bharat Kunwar
parent
commit
b68a678f37
  1. 2
      .zuul.yaml
  2. 8
      magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py
  3. 16
      magnum_tempest_plugin/tests/api/v1/test_cluster.py

2
.zuul.yaml

@ -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:

8
magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py

@ -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

16
magnum_tempest_plugin/tests/api/v1/test_cluster.py

@ -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')

Loading…
Cancel
Save