Min RK
d0360d5c98
update tests with new user models
...
add normalize_user and fill_user utilities
2018-04-03 15:24:08 +02:00
Tim Head
5b9f51417f
Fix permission check when handing out auth state
2018-03-27 10:02:59 +02:00
Tim Head
7a91f89474
Use user's token for auth when using API
2018-03-27 10:02:59 +02:00
Tim Head
bf7afa16e5
Remove auth state from user's self handler
2018-03-27 10:02:59 +02:00
Tim Head
0d57baae82
Modify user API wrt auth_state
...
A user can not get their own auth state via the REST API. Only admins
can fetch and update the auth state this way.
2018-03-27 10:02:59 +02:00
Tim Head
2582f0bbe6
Modify auth_state API test to use mocked crypto
2018-03-27 10:02:59 +02:00
Tim Head
1ee993c664
Add ability to modify auth_state via the REST API
2018-03-27 10:02:59 +02:00
Tim Head
542c20065f
Reduce the number of endpoints that expose auth_state
2018-03-27 10:02:59 +02:00
Tim Head
39f663d03c
Expose auth_state via user API
2018-03-27 10:02:59 +02:00
Min RK
704b172887
update tests to reflect that login no longer implies spawn
2018-03-21 10:51:49 +01:00
Min RK
3614a0e368
move get_self test after get_users
...
to avoid changing expected state
2018-03-13 10:03:01 +01:00
Min RK
0421497b1e
remove web.authenticated from /api/user handler
...
which prevents it from being used with oauth tokens
2018-03-13 10:03:01 +01:00
Min RK
c7c41cd761
remove bad yield in test_api
2018-03-12 18:32:00 +01:00
Min RK
015df7e060
unify mocking of tornado_settings
...
ensures that everywhere we access settings, it's the same dict
and not a copy
2018-03-12 14:23:00 +01:00
Min RK
e2591e8e36
fix user construction in add_user test function
...
ensures same construction is used as the real app
2018-03-12 14:23:00 +01:00
Min RK
89ba97f413
exercise more token API cases
...
separate parametrize cases for clarity
2017-08-30 14:38:00 +02:00
Min RK
8e3553462c
exercise start/stop race conditions
...
this doesn’t cover all the edge cases of each possible stage for the races, but it gets the basics covered.
2017-08-26 11:57:05 -04:00
Min RK
329781023f
use futures to avoid races on slow spawners
...
trigger events by hand so that performance can't cause races
2017-08-03 11:45:29 +02:00
Min RK
684afed3f1
restore user.running property
...
it was made a method for handing named_servers,
but that made things way more complicated and replaced a boolean flag with a callable,
which would behave unexpectedly but without error if a boolean flag was expected.
Spawners have properties for dealing with this now, so use spawners
Restore `user.running` as an alias for `user.spawner.ready`
2017-08-03 11:09:27 +02:00
Min RK
a19a94b2c2
test active_server_limit
2017-08-03 10:52:32 +02:00
Min RK
f49606dff6
add user.count_active_users
...
produces summary of active/pending/ready spawner counts
Avoids brittle bookkeeping of running counts,
computing the value upon request.
For 10k users this is still only a few milliseconds, which seems worth it
2017-08-01 17:00:45 +02:00
Min RK
88268bd76f
test spawn_pending_count
...
make sure to cover various cases of spawn failure
so that failed spawns don't leak pending-spawn counts
2017-07-31 12:39:06 +02:00
Min RK
638f980281
fix race waiting for slow spawners
...
wait for `.running` instead of `._spawn_pending`,
since we now have `._proxy_pending` as well to wait for.
2017-07-27 11:46:33 +02:00
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