Merge "py34: heat.tests.mistral/convergence"

This commit is contained in:
Jenkins 2015-09-23 05:41:52 +00:00 committed by Gerrit Code Review
commit d12c19c504
3 changed files with 12 additions and 3 deletions

View File

@ -11,6 +11,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import six
from heat.db import api as db_api
from heat.engine import service
from heat.engine import stack
@ -37,7 +39,7 @@ class Engine(message_processor.MessageProcessor):
'''
hot_tmpl = {"heat_template_version": "2013-05-23"}
resources = {}
for res_name, res_def in scenario_tmpl.resources.iteritems():
for res_name, res_def in six.iteritems(scenario_tmpl.resources):
props = getattr(res_def, 'properties')
depends = getattr(res_def, 'depends_on')
res_defn = {"type": "OS::Heat::TestResource"}

View File

@ -507,16 +507,21 @@ class TestMistralWorkflow(common.HeatTestCase):
details = {'input': '3'}
err = self.assertRaises(exception.ResourceFailure,
scheduler.TaskRunner(wf.signal, details))
if six.PY3:
entity = 'class'
else:
entity = 'type'
error_message = ("StackValidationFailed: resources.create_vm: "
"Signal data error: Input in"
" signal data must be a map, find a <type 'str'>")
" signal data must be a map, find a <%s 'str'>" %
entity)
self.assertEqual(error_message, six.text_type(err))
details = {'params': '3'}
err = self.assertRaises(exception.ResourceFailure,
scheduler.TaskRunner(wf.signal, details))
error_message = ("StackValidationFailed: resources.create_vm: "
"Signal data error: Params "
"must be a map, find a <type 'str'>")
"must be a map, find a <%s 'str'>" % entity)
self.assertEqual(error_message, six.text_type(err))
def test_signal_wrong_input_key(self):

View File

@ -67,6 +67,7 @@ heat.tests.manila.test_manila_share
heat.tests.manila.test_manila_share_type
heat.tests.manila.test_share_network
heat.tests.mistral.test_mistral_cron_trigger
heat.tests.mistral.test_mistral_workflow
heat.tests.neutron
heat.tests.neutron.test_extraroute
heat.tests.neutron.test_neutron
@ -99,6 +100,7 @@ heat.tests.test_common_policy
heat.tests.test_common_serializers
heat.tests.test_common_service_utils
heat.tests.test_constraints
heat.tests.test_convg_stack
heat.tests.test_crypt
heat.tests.test_cw_alarm
heat.tests.test_dbinstance