Min RK
9e8b6503a0
use gen_test in place of IOLoop.run_sync
...
even where not strictly required
for consistency, now that we are using gen_test on the main app tests
2017-07-27 11:29:58 +02:00
Min RK
f05aecf5f9
test_api passes without threads
...
just put requests in a thread via `utils.async_requests`
eliminates db threads issue
2017-07-27 11:29:16 +02:00
Min RK
eb1895e980
simplify Hub object a bit
...
- remove use of deprecated Hub.server
- add deprecation warning to Hub.server property
- move cookie_name declaration to Hub
It should now be possible to use Hub.from_url('http://1.2.3.4:1234/hub/ ') without missing information
2017-07-26 11:48:30 +02:00
Min RK
382a7121e1
further clear up named servers
...
- use spawner.server instead of user.server
- user.running, proxy_spec are methods that take spawner names
2017-07-20 16:54:17 +02:00
Min RK
a2e94b8493
create Spawners table
...
for named servers
removes User.servers
2017-07-18 14:28:31 +02:00
Min RK
aee3c74681
Merge origin/master into named_servers
2017-07-17 10:53:17 +02:00
Min RK
653a39c05e
checkpoint: named server state
2017-07-17 10:41:36 +02:00
Min RK
11e6c38702
routespecs are strings (again)
...
- no slash means host-routing
- slash means no-host
2017-06-23 14:49:42 +02:00
Min RK
5da4348c2d
move some state to Spawner
...
now that there are more than one per user
2017-06-21 16:33:16 +02:00
Min RK
f5c703a04f
update tests for env change
2017-06-15 11:08:35 +02:00
Min RK
acc31b8441
remove Hub, Proxy from database
...
These are in-memory-only objects, no need for a table with one row
2017-05-04 11:05:58 +02:00
Min RK
d11c7ba4db
cleanup more after mockservices
2017-04-05 15:53:48 +02:00
Min RK
5b1435081a
remove redundant/unused code in mockservice fixture
2017-04-04 17:02:34 +02:00
Min RK
5819b442aa
stop using deprecated server cookie in tests
...
use Hub cookie instead, which still exists
2017-03-31 15:58:39 +02:00
Min RK
2a25e3cb89
replace existing get_token tests
2017-02-08 16:46:50 +01:00
Min RK
2b262f453d
test requesting token via API
2017-02-08 14:32:19 +01:00
Min RK
3402f4f514
Merge pull request #966 from minrk/service-token-auth
...
support service tokens in HubAuth
2017-02-01 13:11:32 +01:00
Carol Willing
021cfe446f
Fix formatting on a few requests
2017-01-26 12:41:39 -08:00
Carol Willing
1a71c906d5
Revert "Relax line length for requests"
2017-01-26 12:26:02 -08:00
Carol Willing
10d2eb6449
Return to original style for line length for requests
2017-01-26 12:20:19 -08:00
Carol Willing
0f283e088e
Fix minor formatting
2017-01-26 12:17:11 -08:00
Carol Willing
025977f19a
Clean up vertical spacing
2017-01-26 12:17:11 -08:00
Min RK
4b6c58292b
add 'kind' field to user and group models
2017-01-26 11:48:20 +01:00
Min RK
7da7f7e074
quotes around single-user CLI args
...
avoids mishandling things such as integer-literals
2016-11-01 12:07:25 +01:00
Min RK
ff92ac9dad
more mocking in tests
...
avoids no_patience state leaking into other tests
2016-10-07 10:59:32 +02:00
Min RK
5ad618bfc1
add API endpoint for services
2016-09-02 15:19:45 +02:00
Min RK
26b00578a1
remove redundant user_url utility
...
public_url works for users now
2016-09-02 13:22:49 +02:00
Min RK
2c47fd4a02
Add /api/ and /api/info endpoints
...
/api/ is not authenticated, and just reports JupyterHub's version for now.
/api/info is admin-only, and reports more detailed info about Python, authenticators/spawners in use, etc.
2016-08-01 15:15:59 +02:00
Min RK
dfa13cb2c5
avoid creating duplicate users in test_api
...
now that we check!
2016-07-28 17:23:44 +02:00
Min RK
2eaecd22ba
cleanup servers, api tokens after spawner shutdown
...
prevents growing table of unused servers and tokens
2016-07-08 16:50:43 +02:00
Min RK
6d106b24f4
add groups API
2016-06-01 14:04:32 +02:00
Min RK
71f47b7a70
add user groups
2016-06-01 13:47:53 +02:00
Min RK
05c268e190
Run tests with an encoded base_url
...
to ensure we get our escaping right
Mostly revealed fixes needed in tests so far, not code,
but should catch regressions.
2016-05-26 13:56:20 +02:00
dominic
c7f542e79e
Add tests for form based token generation
2016-04-18 10:27:38 +02:00
Min RK
67ccfc7eb7
increase some test coverage
2016-03-07 16:13:57 +01:00
Min RK
be5860822d
remove redundant use_subdomains
...
non-empty subdomain_host is enough
2016-03-04 11:11:41 +01:00
Min RK
335b47d7c1
include protocol in subdomain_host
...
makes everything easier, and tests are passing with and without subdomains (yay!)
2016-02-28 11:12:41 +01:00
Min RK
f922561003
Tests are passing with subdomains
2016-02-26 17:32:55 +01:00
Min RK
9441fa37c5
validate usernames
...
via Authenticator.validate_username
base class configurable with Authenticator.username_pattern
2016-01-13 14:02:50 +01:00
Carol Willing
2815f72250
Change mocking of slowspawner to match nospawner
2016-01-05 19:45:49 -08:00
Min RK
41ea696546
Instantiate Spawner on User init
...
shrinks `User.spawn` to take single argument, grants User more direct access to state.
2015-12-30 13:55:36 +01:00
Min RK
54f9a296de
test Spawner.user_options and spawn form
2015-12-30 13:55:01 +01:00
Min RK
6f128758db
move non-persisted User objects (spawner-related) off of orm.User
...
adds higher level User object, which handles spawning.
This object has running, spawner, etc. attributes.
2015-11-30 14:05:00 +01:00
Min RK
d1edbddb77
use gen.sleep
...
instead of elaborate `gen.Task(add_timeout...)`
requires tornado 4.1
2015-09-23 17:04:01 +02:00
Min RK
3003c87f02
check Referer on API requests
...
For CSRF
2015-07-12 14:23:02 -05:00
Min RK
2c8c88ac3f
add CSP report handler
2015-07-12 11:22:21 -05:00
Min RK
48fe642c44
use thread local db sessions
...
to avoid segfaults on Travis
2015-07-09 11:34:35 -05:00
Min RK
612cc73c3c
skip existing users on bulk user creation
...
rather than aborting if any already exist
if no users are to be created, throw 400
2015-05-06 15:24:34 -07:00
Min RK
546d86e888
allow creating multiple users with one API request
2015-05-06 14:01:31 -07:00
Min RK
80997c8297
reply with full user model in auth handlers
2015-05-01 13:43:43 -07:00