Tests: Rename yamlparser tests and fixture directories

Rename fixtures directory to job_fixtures to prepare for adding view_fixtures
directory in the following commits.

Change-Id: Ic20997cae020b542ddc22bf444fa6b92fbcae064
This commit is contained in:
Vsevolod Fedorov 2023-01-18 11:13:02 +03:00
parent d54b331413
commit 6b92807cd7
248 changed files with 60 additions and 60 deletions

View File

@ -168,7 +168,7 @@ job-template.
More complex example:
.. literalinclude::
/../../tests/yamlparser/fixtures/template_default_variables.yaml
/../../tests/yamlparser/job_fixtures/template_default_variables.yaml
:language: yaml
To use a default value for a variable used in the name would be
@ -224,14 +224,14 @@ If there are templates being realized that differ only in the variable
used for its name (thus not a use case for job-specific substitutions),
additional variables can be specified for project variables. Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/templates002.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/templates002.yaml
You can also specify some variable combinations to exclude from the matrix with
the ``exclude`` keyword, to avoid generating jobs for those combinations. You
can specify all the variables of the combination or only a subset, if you
specify a subset, any value of the omited variable will match:
.. literalinclude:: /../../tests/yamlparser/fixtures/template_exclude.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/template_exclude.yaml
The above example will omit the jobs:
@ -244,7 +244,7 @@ a bit more complicated, that gets more complicated for each dimension in the
combination, for the previous example, the counterpart would be:
.. literalinclude::
/../../tests/yamlparser/fixtures/template_without_exclude.yaml
/../../tests/yamlparser/job_fixtures/template_without_exclude.yaml
Job Group
^^^^^^^^^
@ -254,7 +254,7 @@ together, you can define a Job Group to collect them. Simply use the
Job Group where you would normally use a `Job Template`_ and all of
the Job Templates in the Job Group will be realized. For example:
.. literalinclude:: /../../tests/yamlparser/fixtures/templates001.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/templates001.yaml
Would cause the jobs `project-name-unit-tests` and `project-name-perf-tests` to be created
in Jenkins.
@ -450,11 +450,11 @@ own preferences.
Job Name Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/folders-job-name.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/folders-job-name.yaml
Folder Attribute Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/folders-attribute.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/folders-attribute.yaml
.. _ids:
@ -476,7 +476,7 @@ to reference it instead of the name. This has two primary functions:
Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/template_ids.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/template_ids.yaml
.. _raw:
@ -506,7 +506,7 @@ You can use `raw` in most locations, the following example show them
with arbitrary xml-data:
.. literalinclude::
/../../tests/yamlparser/fixtures/complete-raw001.yaml
/../../tests/yamlparser/job_fixtures/complete-raw001.yaml
Note: If you have a need to use `raw` please consider submitting a patch to
add or fix the module that will remove your need to use `raw`.
@ -532,7 +532,7 @@ Will set the job description for every job created.
You can define variables that will be realized in a `Job Template`.
.. literalinclude:: /../../tests/yamlparser/fixtures/template_honor_defaults.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/template_honor_defaults.yaml
Would create jobs ``build-i386`` and ``build-amd64``.
@ -550,7 +550,7 @@ of code that retains the original object type.
For example:
.. literalinclude:: /../../tests/yamlparser/fixtures/custom_distri.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/custom_distri.yaml
JJB also supports interpolation of parameters within parameters. This allows a
@ -559,7 +559,7 @@ projects and job groups.
For example:
.. literalinclude:: /../../tests/yamlparser/fixtures/second_order_parameter_interpolation002.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/second_order_parameter_interpolation002.yaml
By default JJB will fail if it tries to interpolate a variable that was not
@ -568,7 +568,7 @@ allow_empty_variables configuration option.
For example, having a configuration file with that option enabled:
.. literalinclude:: /../../tests/yamlparser/fixtures/allow_empty_variables.conf
.. literalinclude:: /../../tests/yamlparser/job_fixtures/allow_empty_variables.conf
Will prevent JJb from failing if there are any non-initialized variables used
and replace them with the empty string instead.
@ -649,7 +649,7 @@ that JJB definitions allow references to variables in templates.
For example:
.. literalinclude:: /../../tests/yamlparser/fixtures/yaml_anchor.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/yaml_anchor.yaml
The `anchors and aliases`_ are expanded internally within JJB's yaml loading

View File

@ -28,13 +28,13 @@ you to validate the XML before you attempt to upload it to Jenkins.
Test a YAML job definition::
jenkins-jobs test tests/yamlparser/fixtures/templates002.yaml
jenkins-jobs test tests/yamlparser/job_fixtures/templates002.yaml
The above command prints the generated Jenkins XML to the console. If you
prefer to send it to a directory::
jenkins-jobs test -o output tests/yamlparser/fixtures/templates002.yaml
jenkins-jobs test -o output tests/yamlparser/job_fixtures/templates002.yaml
The `output` directory will contain files with the XML configurations.
@ -49,7 +49,7 @@ Once you've tested your job definition and are happy with it then you can use th
configuration file. An example file is supplied in the etc folder, you should
update it to match your Jenkins master::
jenkins-jobs --conf etc/jenkins_jobs.ini-sample update tests/yamlparser/fixtures/templates002.yaml
jenkins-jobs --conf etc/jenkins_jobs.ini-sample update tests/yamlparser/job_fixtures/templates002.yaml
The above command will update your Jenkins master with the generated jobs.

View File

@ -45,7 +45,7 @@ Generic Example:
Environment Inject:
.. literalinclude:: /../../tests/yamlparser/fixtures/string_join.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/string_join.yaml
While this mechanism can also be used items where delimiters are supported by
@ -78,7 +78,7 @@ Example:
contents of include001.yaml.inc:
.. literalinclude:: /../../tests/yamlparser/fixtures/include001.yaml.inc
.. literalinclude:: /../../tests/yamlparser/job_fixtures/include001.yaml.inc
The tag ``!include-raw:`` will treat the given string or list of strings as
@ -153,12 +153,12 @@ parsing, it is delayed until the variable substitution is performed.
Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/lazy-load-jobs001.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/lazy-load-jobs001.yaml
using a list of files:
.. literalinclude::
/../../tests/yamlparser/fixtures/lazy-load-jobs-multi001.yaml
/../../tests/yamlparser/job_fixtures/lazy-load-jobs-multi001.yaml
.. note::
@ -182,11 +182,11 @@ templating that will happen with ``!include-raw``.)
Examples:
.. literalinclude:: /../../tests/yamlparser/fixtures/jinja01.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/jinja01.yaml
contents of jinja01.yaml.inc:
.. literalinclude:: /../../tests/yamlparser/fixtures/jinja01.yaml.inc
.. literalinclude:: /../../tests/yamlparser/job_fixtures/jinja01.yaml.inc
The tag ``!j2:`` takes a string and treats it as a Jinja2 template. It will be
@ -195,7 +195,7 @@ construct.
Examples:
.. literalinclude:: /../../tests/yamlparser/fixtures/jinja-string01.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/jinja-string01.yaml
The tag ``!j2-yaml:`` is similar to the ``!j2:`` tag, just that it loads the
Jinja-rendered string as YAML and embeds it in the calling YAML construct. This
@ -205,14 +205,14 @@ simpler configuration, without any duplication.
Examples:
.. literalinclude:: /../../tests/yamlparser/fixtures/jinja-yaml01.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/jinja-yaml01.yaml
Another use case is controlling lists dynamically, like conditionally adding
list elements based on project configuration.
Examples:
.. literalinclude:: /../../tests/yamlparser/fixtures/jinja-yaml02.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/jinja-yaml02.yaml
"""

View File

@ -2322,7 +2322,7 @@ def critical_block_start(registry, xml_parent, data):
Example:
.. literalinclude::
../../tests/yamlparser/fixtures/critical_block_complete001.yaml
../../tests/yamlparser/job_fixtures/critical_block_complete001.yaml
:language: yaml
"""
cbs = XML.SubElement(
@ -2344,7 +2344,7 @@ def critical_block_end(registry, xml_parent, data):
Example:
.. literalinclude::
../../tests/yamlparser/fixtures/critical_block_complete001.yaml
../../tests/yamlparser/job_fixtures/critical_block_complete001.yaml
:language: yaml
"""
cbs = XML.SubElement(

View File

@ -17,7 +17,7 @@
Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/general-example-001.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/general-example-001.yaml
:Job Parameters:
* **project-type**:

View File

@ -1237,13 +1237,13 @@ def active_choices_param(registry, xml_parent, data):
Minimal Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/active-choices-param001.yaml
/../../tests/yamlparser/job_fixtures/active-choices-param001.yaml
:language: yaml
Full Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/active-choices-param002.yaml
/../../tests/yamlparser/job_fixtures/active-choices-param002.yaml
:language: yaml
"""
element_name = "org.biouno.unochoice.ChoiceParameter"
@ -1295,13 +1295,13 @@ def active_choices_reactive_param(registry, xml_parent, data):
Minimal Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/active-choices-reactive-param001.yaml
/../../tests/yamlparser/job_fixtures/active-choices-reactive-param001.yaml
:language: yaml
Full Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/active-choices-reactive-param002.yaml
/../../tests/yamlparser/job_fixtures/active-choices-reactive-param002.yaml
:language: yaml
"""
@ -1391,13 +1391,13 @@ def dynamic_reference_param(registry, xml_parent, data):
Minimal Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/dynamic-reference-param001.yaml
/../../tests/yamlparser/job_fixtures/dynamic-reference-param001.yaml
:language: yaml
Full Example:
.. literalinclude::
/../../tests/yamlparser/fixtures/dynamic-reference-param002.yaml
/../../tests/yamlparser/job_fixtures/dynamic-reference-param002.yaml
:language: yaml
"""
element_name = "org.biouno.unochoice.DynamicReferenceParameter"

View File

@ -35,17 +35,17 @@ python str.format() command.
Job example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_flow_template001.yaml
/../../tests/yamlparser/job_fixtures/project_flow_template001.yaml
Job template example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_flow_template002.yaml
/../../tests/yamlparser/job_fixtures/project_flow_template002.yaml
Job example runninng a DSL file from the workspace:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_flow_template003.yaml
/../../tests/yamlparser/job_fixtures/project_flow_template003.yaml
"""

View File

@ -25,12 +25,12 @@ Requires the Jenkins :jenkins-plugins:`CloudBees Folders Plugin
Job example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_folder_template001.yaml
/../../tests/yamlparser/job_fixtures/project_folder_template001.yaml
Job template example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_folder_template002.yaml
/../../tests/yamlparser/job_fixtures/project_folder_template002.yaml
"""

View File

@ -84,7 +84,7 @@ Requires the Jenkins :jenkins-plugins:`ShiningPanda Plugin <shiningpanda>`.
Example:
.. literalinclude:: /../../tests/yamlparser/fixtures/project-matrix001.yaml
.. literalinclude:: /../../tests/yamlparser/job_fixtures/project-matrix001.yaml
:language: yaml
Examples for yaml axis:

View File

@ -49,27 +49,27 @@ Note that ``dsl`` and ``pipeline-scm`` parameters are mutually exclusive.
Inline DSL job example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_pipeline_template001.yaml
/../../tests/yamlparser/job_fixtures/project_pipeline_template001.yaml
Inline DSL job template example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_pipeline_template002.yaml
/../../tests/yamlparser/job_fixtures/project_pipeline_template002.yaml
"Pipeline as code" example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_pipeline_template004.yaml
/../../tests/yamlparser/job_fixtures/project_pipeline_template004.yaml
"Pipeline as code" example using templates:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_pipeline_template005.yaml
/../../tests/yamlparser/job_fixtures/project_pipeline_template005.yaml
"Pipeline as nested stage" example :
.. literalinclude::
/../../tests/yamlparser/fixtures/project_pipeline_template006.yaml
/../../tests/yamlparser/job_fixtures/project_pipeline_template006.yaml
.. _Pipeline as code: https://jenkins.io/solutions/pipeline/

View File

@ -39,12 +39,12 @@ python str.format() command.
Job example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_workflow_template001.yaml
/../../tests/yamlparser/job_fixtures/project_workflow_template001.yaml
Job template example:
.. literalinclude::
/../../tests/yamlparser/fixtures/project_workflow_template002.yaml
/../../tests/yamlparser/job_fixtures/project_workflow_template002.yaml
"""
import logging

View File

@ -1,2 +0,0 @@
[job_builder]
include_path=tests/localyaml/fixtures:.

View File

@ -1,2 +0,0 @@
[job_builder]
include_path=tests/yamlparser/fixtures:tests/yamlparser/fixtures/other_include_path

View File

@ -1,2 +0,0 @@
[job_builder]
include_path=tests/yamlparser/fixtures/other_include_path:tests/yamlparser/fixtures

View File

@ -1,2 +0,0 @@
[job_builder]
include_path=tests/yamlparser/fixtures/lazy-load-scripts

View File

@ -0,0 +1,2 @@
[job_builder]
include_path=tests/yamlparser/job_fixtures:.

View File

@ -0,0 +1,2 @@
[job_builder]
include_path=tests/yamlparser/job_fixtures:tests/yamlparser/job_fixtures/other_include_path

View File

@ -0,0 +1,2 @@
[job_builder]
include_path=tests/yamlparser/job_fixtures/other_include_path:tests/yamlparser/job_fixtures

Some files were not shown because too many files have changed in this diff Show More