zuul/tests/unit
Monty Taylor f93c2fb5f1
Make Info.endpoint a config override
The endpoint field in the info payload is intended to help the
javascript web code find out where the API endpoint is, and to allow
people who are deploying html/js as static assets to an external web
server drop a json file in that deployment to tell it where their
zuul-web server is.

The only scenario where the endpoint information as served by the /info
or /{tenant}/info endpoints of zuul-web is useful is
same-host/single-apache deployments that are hosted on a sub-url ... and
unfortunately, it's not possible for the aiohttp code to be aware of
such suburl deployments from http headers. request.url has the actual
location (such as http://localhost:8080/info) and X-Forwarded-Host will
only contain the host, not the path.

The actual important aspects of the payload are:

* A payload always be able to be found no matter the deployment
  scenario.
* That a deployer can communicate to the javascript code the root of the
  REST API in the scenarios where relative paths will resolve to the
  incorrect thing.

With that in mind, change the Info.endpoint field returned by zuul-web
to default to None (or actually json null), or to a value provided by
the deployer in the zuul.conf file similar to websocket_url.

This way the web app can view 'null' as meaning "I'm deployed in such a
manner that relative paths are the correct thing to fetch from" and a value
as "the deployer has told me explicitly where to fetch from, I will join
my relative paths to the value first."

Because it is a value that is provided by the deployer if it is to
exist, rename it to "rest_api_url" to better match websocket_url and
stats_url.

Change-Id: I6b85a93db6c70c997bbff1329373fbfc2d1007c6
2018-03-02 18:21:45 -05: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 Do not call merger:cat when all config items are excluded 2018-02-07 12:12:25 +01:00
test_connection.py Merge "Really change patchset column to string" into feature/zuulv3 2018-01-16 23:05:19 +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 host/group vars 2018-02-15 08:57:32 -08:00
test_gerrit.py change assert(Not)Equals to assert(Not)Equal 2017-09-13 17:34:24 -06: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 Fix AttributeError when handle periodic job with github driver 2018-02-05 15:16:15 +08:00
test_github_requirements.py Remove unnecessary loop in github test 2017-07-06 15:59:03 -07:00
test_inventory.py Add specific setup inventory 2017-12-28 18:13:44 +01:00
test_merger_repo.py Set remote url on every getRepo in merger 2018-02-13 17:01:09 +01:00
test_model.py Avoid creating extra project schemas 2018-02-19 13:26:43 -08: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 Merge "Support autoholding nodes for specific changes/refs" 2018-02-10 08:17:38 +00: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 Remove need to start executor as root 2018-01-10 13:57:16 -05:00
test_v3.py Allow test_playbook to run long 2018-02-19 10:55:16 -08:00
test_web.py Make Info.endpoint a config override 2018-03-02 18:21:45 -05:00
test_zuultrigger.py Support cross-source dependencies 2018-01-16 09:37:40 -08:00