~ubuntu-branches/ubuntu/vivid/heat/vivid-updates

« back to all changes in this revision

Viewing changes to heat/tests/test_validate.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant
  • Date: 2015-08-03 14:29:26 UTC
  • mfrom: (1.1.26)
  • Revision ID: package-import@ubuntu.com-20150803142926-03mb0ei445c4tlt2
Tags: 2015.1.1-0ubuntu1
* Resynchronize with stable/kilo (536dc83) (LP: #1481008):
  - [9ca4a53] Use action in check_*_complete method
  - [ed52c86] Produce more meaningful exception messages in nested stacks
  - [e35450a] Fix failures related to the mock 1.1.0 release
  - [ac5e71f] test_resource for functional tests
  - [c0d1b91] Improve StackValidationFailed response in properties
  - [99f95f0] Count all nested stack resources with DB operations
  - [5703a2f] Add domain when list users in heat-keystone-setup-domain
  - [18742d1] Heat could not create samples with Ceilometer
  - [a55f827] Missing template file on update fails silently
  - [1b5ff07] Failed to import test module in test
  - [b0be013] Add env storing for loaded environments
  - [a3bc0f6] Fix heat-db-setup error on rhel7.1
  - [3a7e7cb] Find root stack ID with database operations
  - [38b47eb] Continue to check if nova task is in progress
  - [8919a34] Catch exceptions in service status report
  - [754851d] Fix block_device_mapping property validation when using get_attr
  - [28a0639] Do not verify requirements on extension loading
  - [7148a96] Backup new resource as soon as possible
  - [da37773] Save updated-in-place resources to backup stack
  - [be9af28] Report status when engine start
  - [d2e70e4] Use snapshot's environment when stack restore
  - [612d806] Fix integration tests for tox>2.0
  - [ed2bed2] Fix property validation for TemplateResource during update
  - [a5297fe] Get rid of circular references in Resource and Function
  - [c7b1524] Sync oslo incubator
  - [06a5c0e] Generate stack events for stack state transitions
  - [aa4b90d] Update template paths for environment-mapped TemplateResources
  - [2a6378c] Fix TypeError exception during cancel stack update
  - [536dc83] Use SHA256 instead of SHA1 for resource signature
* d/p/fix-requirements.patch: Rebased.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1034
1034
        t = template_format.parse(test_template_invalid_property)
1035
1035
        engine = service.EngineService('a', 't')
1036
1036
        res = dict(engine.validate_template(None, t, {}))
1037
 
        self.assertEqual({'Error': 'Unknown Property UnknownProperty'}, res)
 
1037
        self.assertEqual({'Error': 'Property error: WikiDatabase.Properties: '
 
1038
                                   'Unknown Property UnknownProperty'}, res)
1038
1039
 
1039
1040
    def test_invalid_resources(self):
1040
1041
        t = template_format.parse(test_template_invalid_resources)
1083
1084
        engine = service.EngineService('a', 't')
1084
1085
        res = dict(engine.validate_template(None, t, {}))
1085
1086
        self.assertEqual(
1086
 
            {'Error': 'Property SourceDestCheck not implemented yet'},
 
1087
            {'Error': 'Property error: WikiDatabase.Properties: '
 
1088
                      'Property SourceDestCheck not implemented yet'},
1087
1089
            res)
1088
1090
 
1089
1091
    def test_invalid_deletion_policy(self):
1366
1368
                                stack.validate)
1367
1369
 
1368
1370
        self.assertEqual(_('The InstanceType parameter must be assigned to '
1369
 
                         'one Parameter Group only.'), six.text_type(exc))
 
1371
                           'one Parameter Group only.'),
 
1372
                         six.text_type(exc))
1370
1373
 
1371
1374
    def test_validate_invalid_parameter_in_group(self):
1372
1375
        t = template_format.parse(test_template_invalid_parameter_name)
1381
1384
                                stack.validate)
1382
1385
 
1383
1386
        self.assertEqual(_('The Parameter name (SomethingNotHere) does not '
1384
 
                         'reference an existing parameter.'),
 
1387
                           'reference an existing parameter.'),
1385
1388
                         six.text_type(exc))
1386
1389
 
1387
1390
    def test_validate_no_parameters_in_group(self):
1391
1394
        exc = self.assertRaises(exception.StackValidationFailed,
1392
1395
                                stack.validate)
1393
1396
 
1394
 
        self.assertEqual(_('Parameters must be provided for each Parameter '
1395
 
                         'Group.'), six.text_type(exc))
 
1397
        self.assertEqual(_('Parameters must be provided for each '
 
1398
                           'Parameter Group.'), six.text_type(exc))
1396
1399
 
1397
1400
    def test_validate_allowed_values_integer(self):
1398
1401
        t = template_format.parse(test_template_allowed_integers)