Remove file extension when building SimpleLayout

When using simple_layout, the setup function is adding ".yaml" to the
file names it is creating (meaning playbooks get names like
"playbooks/run/integration.yaml.yaml").

This is hidden by the implied playbook extension matching, which
searches for files with an added ".yaml" so finds them
anyway. However, simple_layout unit tests then break when this
matching is removed (Ie2519f2b4144761b8e4d17ec3299cf4238e16f08).

Change-Id: Ibfacd73840b995873156f1687860ea6792b30b26
This commit is contained in:
Ian Wienand 2017-12-05 14:16:19 +11:00
parent 1edfd97943
commit 5ede2fa3df
1 changed files with 3 additions and 3 deletions

View File

@ -2256,13 +2256,13 @@ class ZuulTestCase(BaseTestCase):
branch='master', tag='init')
if 'job' in item:
if 'run' in item['job']:
files['%s.yaml' % item['job']['run']] = ''
files['%s' % item['job']['run']] = ''
for fn in zuul.configloader.as_list(
item['job'].get('pre-run', [])):
files['%s.yaml' % fn] = ''
files['%s' % fn] = ''
for fn in zuul.configloader.as_list(
item['job'].get('post-run', [])):
files['%s.yaml' % fn] = ''
files['%s' % fn] = ''
root = os.path.join(self.test_root, "config")
if not os.path.exists(root):