add proxy API

- GET fetches proxy table (relays same request to proxy's API endpoint)
- POST prods routing table sync (useful when proxy restarts)
- PATCH allows updating the proxy API location, auth token
This commit is contained in:
Min RK
2015-02-06 17:06:41 -08:00
parent 0dc3150762
commit 4fd58b2bf2
4 changed files with 79 additions and 3 deletions

View File

@@ -275,3 +275,10 @@ def test_never_spawn(app, io_loop):
assert not user.spawn_pending
status = io_loop.run_sync(user.spawner.poll)
assert status is not None
def test_get_proxy(app, io_loop):
r = api_request(app, 'proxy')
r.raise_for_status()
reply = r.json()
assert list(reply.keys()) == ['/']