zuul/tests/unit
James E. Blair abad438e53 Align enqueue/dequeue events with trigger events
EnqueueEvents and DequeueEvents are duck-typed as TriggerEvents
when they are passed to source.getChange.  TriggerEvents are always
created in the context of a connection, so they have a hostname
field and a name field, and name should never have the hostname.

However, our current EnqueueEvents are created directly from
client-side user input and accept any form of project name.  This
means when we get a change from them, we may end up with a Project
that has a canonical name for it's "name" field.  This could not
only cause the enqueue event to be rejected, it could leak project
objects.

To correct this, perform some pre-processing on the input data to
get separate host/name data for the project, and then use that to
construct an Enqueue/DequeueEvent with the same field usage as
a TriggerEvent.

Change-Id: Ib596c282eba3a01c10d28593545e5d238d09de0c
2021-03-27 09:55:26 -07:00
..
__init__.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_auth.py Bump pyjwt to 2.0.0 2021-01-14 12:35:18 +00:00
test_bubblewrap.py Make most test cases work on MacOS 2020-02-20 12:59:38 +01:00
test_change_matcher.py Make files matcher match changes with no files 2019-08-23 18:59:29 +02:00
test_circular_dependencies.py Merge "Check cycle items are mergeable before reporting" 2021-03-08 14:12:57 +00:00
test_client.py Initialize ZooKeeper connection in server rather than in cmd classes 2021-03-08 07:15:32 -08:00
test_cmd.py Revert "Revert "Add the process environment to zuul.conf parser"" 2019-11-02 09:10:18 +09:00
test_component_registry.py Component Registry in ZooKeeper 2021-03-12 13:51:48 -08:00
test_configloader.py Merge "Handle the yaml merge operator" 2021-03-02 18:06:31 +00:00
test_connection.py Merge "Required SQL reporters" 2021-02-05 18:13:30 +00:00
test_cross_crd.py Separate connection registries in tests 2020-10-13 07:00:09 +02:00
test_daemon.py Remove unecessary shebang and exec bit 2018-07-26 07:12:24 +00:00
test_default_config.py Add type check for zuul conf 2018-12-10 19:24:50 +08:00
test_disk_accountant.py Optionally disable disk_limit_per_job 2019-02-22 08:10:59 +01:00
test_encryption.py Use nested tempfile fixture for cleanups 2018-02-06 15:18:45 -08:00
test_event_queues.py Merge "Use ephemeral nodes for management result events" 2021-03-26 19:38:42 +00:00
test_executor.py Use shell-type config from nodepool 2021-03-08 22:16:23 +01:00
test_gerrit.py Gerrit: add support for patchset level comments 2020-12-11 20:37:53 +01:00
test_gerrit_crd.py Separate connection registries in tests 2020-10-13 07:00:09 +02:00
test_gerrit_legacy_crd.py Separate connection registries in tests 2020-10-13 07:00:09 +02:00
test_git_driver.py Use scheduler manager consistently in tests 2020-04-03 14:49:59 +02:00
test_github_crd.py Use scheduler manager consistently in tests 2020-04-03 14:49:59 +02:00
test_github_driver.py Fix bug w/ None event in Github event forwarder 2021-03-23 11:11:46 +01:00
test_github_requirements.py Fix multiple prs found when commit is not head 2020-09-04 13:47:54 +02:00
test_gitlab_driver.py Initialize ZooKeeper connection in server rather than in cmd classes 2021-03-08 07:15:32 -08:00
test_inventory.py Use shell-type config from nodepool 2021-03-08 22:16:23 +01:00
test_keystorage.py Add private key storage migration 2018-09-04 15:42:38 -07:00
test_lib_ansible.py Validate ansible extra packages 2020-05-08 09:03:10 +02:00
test_merger_repo.py Merge "Prune git tags on fetch" 2021-03-02 00:37:16 +00:00
test_model.py Fix trigger event forwarding bug 2021-03-23 01:08:11 +00:00
test_multi_driver.py Make test setup_config more pure 2020-02-28 11:50:22 +01:00
test_nodepool.py Move setupZK() helper function to BaseTestCase class 2021-03-08 06:50:03 -08:00
test_openstack.py Remove unecessary shebang and exec bit 2018-07-26 07:12:24 +00:00
test_pagure_driver.py Initialize ZooKeeper connection in server rather than in cmd classes 2021-03-08 07:15:32 -08:00
test_push_reqs.py Make test setup_config more pure 2020-02-28 11:50:22 +01:00
test_reporting.py Report dequeued changes via Github checks API 2020-05-14 07:42:24 +02:00
test_requirements.py Fix reject clauses in the absence of approvals 2018-08-13 12:37:32 +02:00
test_scheduler.py Align enqueue/dequeue events with trigger events 2021-03-27 09:55:26 -07:00
test_serial.py Make fake test Gerrit merger more realistic 2020-04-29 15:00:05 -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_streaming.py Initialize ZooKeeper connection in server rather than in cmd classes 2021-03-08 07:15:32 -08:00
test_supercedent.py Check branches in supercedent pipelines 2019-04-05 13:59:05 -07:00
test_v3.py Make repo state buildset global 2021-03-05 13:28:22 +01:00
test_web.py Get executor job params 2021-03-12 00:16:09 +00:00
test_web_urls.py Initialize ZooKeeper connection in server rather than in cmd classes 2021-03-08 07:15:32 -08:00
test_zk.py Move setupZK() helper function to BaseTestCase class 2021-03-08 06:50:03 -08:00
test_zuultrigger.py Switch to Zookeeper backed trigger event queues 2021-03-18 09:24:09 +01:00