Automatically provide 'name' to project templates
Provide the short name of a project (anything after the last '/') to
project templates as the variable 'name'. If 'openstack/nova' invoked
a template, the variable 'name' would automatically be set to 'nova'
within the template.
Ideally this means that most template invocations in OpenStack's layout
will not need any variables defined.
Change-Id: I596744917c30c92041b8ea5b1f518d50fb64e59b
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 8fb8419..48f2281 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -1971,14 +1971,14 @@
'SUCCESS')
self.assertEqual(self.getJobFromHistory('project-test2').result,
'SUCCESS')
- self.assertEqual(self.getJobFromHistory('project-test3').result,
- 'SUCCESS')
- self.assertEqual(self.getJobFromHistory('project-test4').result,
- 'SUCCESS')
- # project-test5 should run twice because two templates define it
+ self.assertEqual(self.getJobFromHistory('layered-project-test3'
+ ).result, 'SUCCESS')
+ self.assertEqual(self.getJobFromHistory('layered-project-test4'
+ ).result, 'SUCCESS')
+ # test5 should run twice because two templates define it
test5_count = 0
for job in self.worker.build_history:
- if job.name == 'project-test5':
+ if job.name == 'layered-project-foo-test5':
test5_count += 1
self.assertEqual(job.result, 'SUCCESS')
self.assertEqual(test5_count, 2)