Tests: Add tests for including a list of files
There were no tests for !include: and !include-jinja2: with a list of files. Change-Id: Id786e0306ec0279e98ac3b3cb7da62e688bcb12e
This commit is contained in:
parent
a4052b1388
commit
8784d916a6
20
tests/yamlparser/job_fixtures/include002-list.xml
Normal file
20
tests/yamlparser/job_fixtures/include002-list.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<actions/>
|
||||
<description><!-- Managed by Jenkins Job Builder --></description>
|
||||
<keepDependencies>false</keepDependencies>
|
||||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||
<concurrentBuild>false</concurrentBuild>
|
||||
<canRoam>true</canRoam>
|
||||
<properties/>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<builders>
|
||||
<hudson.tasks.Shell>
|
||||
<command>echo include-1
|
||||
echo include-2 echo var=12345</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers/>
|
||||
</project>
|
14
tests/yamlparser/job_fixtures/include002-list.yaml
Normal file
14
tests/yamlparser/job_fixtures/include002-list.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
# Check including a list of files, with variable expansion.
|
||||
|
||||
- job-template:
|
||||
name: sample-job
|
||||
var: 12345
|
||||
builders:
|
||||
- shell: !include:
|
||||
- include002-list.yaml.shell-1
|
||||
- include002-list.yaml.shell-2
|
||||
|
||||
- project:
|
||||
name: sample-project
|
||||
jobs:
|
||||
- sample-job
|
@ -0,0 +1 @@
|
||||
echo include-1
|
@ -0,0 +1,2 @@
|
||||
echo include-2
|
||||
echo var={var}
|
22
tests/yamlparser/job_fixtures/jinja04-list.xml
Normal file
22
tests/yamlparser/job_fixtures/jinja04-list.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<actions/>
|
||||
<description><!-- Managed by Jenkins Job Builder --></description>
|
||||
<keepDependencies>false</keepDependencies>
|
||||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||
<concurrentBuild>false</concurrentBuild>
|
||||
<canRoam>true</canRoam>
|
||||
<properties/>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<builders>
|
||||
<hudson.tasks.Shell>
|
||||
<command>
|
||||
1
|
||||
2
|
||||
3</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers/>
|
||||
</project>
|
12
tests/yamlparser/job_fixtures/jinja04-list.yaml
Normal file
12
tests/yamlparser/job_fixtures/jinja04-list.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
# Check jinja-including a list of files.
|
||||
|
||||
- job-template:
|
||||
name: sample-job
|
||||
builders:
|
||||
- shell: !include-jinja2:
|
||||
- jinja03.yaml.inc
|
||||
|
||||
- project:
|
||||
name: sample-project
|
||||
jobs:
|
||||
- sample-job
|
Loading…
Reference in New Issue
Block a user