zuul/tests/unit
James E. Blair 46e48d7b97 Move SQL web handler to driver
The only rest API endpoint that uses sql queries is
/api/tenant/{tenant}/builds.  There's no connection in there, which
means it doesn't make sense for that to be attached to a sql connection
(which is currently the case).  Moreover, it doesn't make sense for
*every* tenant's endpoint to be attached to the *same* connection.

In other words, the current situation only allows for a single sql
connection system-wide, even if someone is using different connections
per tenant.

Moving the handler for the endpoint into the sql driver means that it
can dispatch the query to the appropriate connection for a given tenant
(since a tenant is always implied by the REST endpoint).

Moreover, the *rest* of the system actually allows multiple connections
within a single tenant, and we should support that here, but I don't
immediately have a solution of how to handle pagination across queries
that span multiple connections.  This is an improvement in that it is
now tenant-scoped, but it's not ideal.

This also removes the (undocumented!) sql_connection_name config file
option.

It also uses the tenant name from the path to constructe the query so
that it always includes the correct tenant (this eliminates the
inadvertant ability for one tenant to query another tenant's builds).

The internal API here isn't great, but it will get cleaned up in the
next patch which converts to cherrypy.

Change-Id: Ie1f19f0b392d4c010ef43dc6220ff1c8667f5a4a
2018-05-31 09:08:53 -07:00
..
__init__.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_bubblewrap.py Fix race in test_bubblewrap_leak 2018-05-02 17:44:09 +02:00
test_change_matcher.py Fix branch matching logic 2017-10-02 17:30:51 -04:00
test_configloader.py Don't validate references for excluded config items 2018-05-03 09:58:02 +02:00
test_connection.py Merge "mqtt: add basic reporter" 2018-05-31 15:13:41 +00:00
test_cross_crd.py Add cross-source tests 2018-01-16 09:37:59 -08:00
test_daemon.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_disk_accountant.py Use nested tempfile fixture for cleanups 2018-02-06 15:18:45 -08:00
test_encryption.py Use nested tempfile fixture for cleanups 2018-02-06 15:18:45 -08:00
test_executor.py Add debug info to test_slow_start 2018-04-27 11:11:23 -07:00
test_gerrit.py Cleanup use of mock package in for python2 2018-03-29 18:10:23 -07:00
test_gerrit_crd.py Support the fragment form of Gerrit URLs 2018-01-31 14:11:39 -08:00
test_gerrit_legacy_crd.py Fix dependency cycle false positive 2018-01-17 04:23:39 +00:00
test_git_driver.py Stabilize git driver tests 2018-01-17 09:53:18 -08:00
test_github_crd.py Implement Depends-On for github 2017-06-29 11:26:19 -07:00
test_github_driver.py Move SQL web handler to driver 2018-05-31 09:08:53 -07:00
test_github_requirements.py Support regex matching of github status 2018-04-13 18:15:19 +02:00
test_inventory.py Inventory groups should be under children key 2018-04-30 12:59:13 -07:00
test_merger_repo.py Don't try to delete non-existing local refs 2018-04-24 19:38:54 +02:00
test_model.py Remove source_context argument to Pipeline 2018-04-27 09:04:47 -07:00
test_multi_driver.py Remove status handling from FakeGithubConnection 2017-08-03 19:22:54 +00:00
test_nodepool.py Add support for shared ansible_host in inventory 2017-11-18 16:22:01 -05: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 Fix race in test_reconfigure_window_fixed 2018-05-17 07:35:25 -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 Move SQL web handler to driver 2018-05-31 09:08:53 -07:00
test_v3.py Don't validate references for excluded config items 2018-05-03 09:58:02 +02:00
test_web.py Move SQL web handler to driver 2018-05-31 09:08:53 -07:00
test_web_urls.py Move SQL web handler to driver 2018-05-31 09:08:53 -07:00
test_zuultrigger.py Support cross-source dependencies 2018-01-16 09:37:40 -08:00