zuul/tests/unit
James E. Blair 2a66450452 Add multi-branch support for project-templates
Currently, to avoid confusion, we simply ignore project-template
definitions after the first.  However, a more intuitive approach
would be, if the template appears on multiple branches, to have
it reflect those branches.

To that end, add implied branch matchers to templates in the same
way that we do to jobs themselves.  This should provide the same
intuitive behavior where a template defined in zuul-jobs will apply
to all branches, but one defined in a multi-branch repository will
add jobs with implied branch matchers.

When a template is defined more than once, combine them (in the same
way that multiple project definitions are defined) so the resulting
template contains all the jobs (likely with implied branch matchers).

Allow a template to be defined multiple times (e.g., branches) within
the same project, but do not allow it to be redefined in another
project.

Because the multiple project definitions in different branches may
end up applying the same template (which will have all of the
per-branch jobs) multiple times, detect duplicate job definitions
when applying templates and filter them out.

The test test_dynamic_template was originally written to verify that
a project could not redefine a template defined in another project.
Clarify that, and update it to support the newly reported error in
that condition.

Change-Id: I6613885a8c7ebf400e85041e0d68b2eb5ceb033f
2017-10-27 13:41:25 -07:00
..
__init__.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_bubblewrap.py Write secrets to tmpfs 2017-08-19 08:08:19 -07:00
test_change_matcher.py Fix branch matching logic 2017-10-02 17:30:51 -04:00
test_clonemapper.py Tests: store debug logs on error 2017-02-06 10:10:48 -08:00
test_cloner_cmd.py Replace equals None with is None 2017-06-05 13:06:10 -05:00
test_configloader.py change assert(Not)Equals to assert(Not)Equal 2017-09-13 17:34:24 -06:00
test_connection.py Merge "Add oldrev/newrev column to the buildset reporter table" into feature/zuulv3 2017-10-19 17:07:07 +00:00
test_daemon.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_disk_accountant.py Improve cleanup of test disk accountant 2017-08-01 07:51:23 +02:00
test_encryption.py Encoding changes in tests for py3 2017-05-19 06:45:31 -07:00
test_executor.py Change domain in test fixture to example.com 2017-10-19 17:28:44 +00:00
test_gerrit.py change assert(Not)Equals to assert(Not)Equal 2017-09-13 17:34:24 -06:00
test_git_driver.py Replace config/project repos with config/untrusted projects 2017-04-18 15:52:33 -07:00
test_github_crd.py Implement Depends-On for github 2017-06-29 11:26:19 -07:00
test_github_driver.py Split github hook ingest and processing 2017-09-06 13:50:11 -07:00
test_github_requirements.py Remove unnecessary loop in github test 2017-07-06 15:59:03 -07:00
test_inventory.py Put variables into the inventory 2017-06-06 14:57:25 -05:00
test_log_streamer.py Support IPv6 in the finger log streamer 2017-09-08 15:41:28 -04:00
test_merger_repo.py Add git timeout 2017-10-10 08:10:20 -07:00
test_model.py Validate that a job has a run playbook on freeze 2017-10-26 16:05:22 -07:00
test_multi_driver.py Remove status handling from FakeGithubConnection 2017-08-03 19:22:54 +00:00
test_nodepool.py Emit some nodepool stats 2017-10-13 15:56:59 -07:00
test_openstack.py Use correct label casing in tests 2017-07-27 07:50:03 +02:00
test_push_reqs.py Ensure ref-updated jobs run with their ref 2017-08-02 16:56:18 -07:00
test_requirements.py Use correct label casing in tests 2017-07-27 07:50:03 +02:00
test_scheduler.py Validate that a job has a run playbook on freeze 2017-10-26 16:05:22 -07:00
test_scheduler_cmd.py Move test_test_config to a cmd-focused test suite 2017-05-01 12:49:32 -07:00
test_ssh_agent.py Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
test_stack_dump.py Several executor threading fixes 2017-10-17 09:49:29 -07:00
test_v3.py Add multi-branch support for project-templates 2017-10-27 13:41:25 -07:00
test_webapp.py Return 404 on unknown tenants 2017-08-17 09:54:08 -07:00
test_zuultrigger.py Use correct label casing in tests 2017-07-27 07:50:03 +02:00