Commit Graph

52 Commits (5fc03449c8b78018bce4201826aa75d856da11d9)

Author SHA1 Message Date
Daniel Wagner-Hall 14d7acfad4 Host /unstable and /r0 versions of r0 APIs 2015-12-01 17:34:32 +00:00
Mark Haines 36c58b18a3 Test for background updates 2015-11-10 15:51:40 +00:00
Daniel Wagner-Hall 771ca56c88 Remove more unused parameters 2015-11-02 15:31:57 +00:00
Erik Johnston 17c80c8a3d rename schema_prepare to prepare_database 2015-10-13 13:56:22 +01:00
Erik Johnston ec398af41c Expose error more nicely 2015-10-13 11:43:43 +01:00
Daniel Wagner-Hall 3063383547 Swap out bcrypt for md5 in tests
This reduces our ~8 second sequential test time down to ~7 seconds
2015-08-26 15:59:32 +01:00
Daniel Wagner-Hall a9d8bd95e7 Stop looking up "admin", which we never read 2015-08-25 16:29:39 +01:00
Daniel Wagner-Hall a0b181bd17 Remove completely unused concepts from codebase
Removes device_id and ClientInfo

device_id is never actually written, and the matrix.org DB has no
non-null entries for it. Right now, it's just cluttering up code.

This doesn't remove the columns from the database, because that's
fiddly.
2015-08-25 16:23:06 +01:00
Daniel Wagner-Hall 13a6517d89 s/by_token/by_access_token/g
We're about to have two kinds of token, access and refresh
2015-08-20 16:01:29 +01:00
Daniel Wagner-Hall 2d3462714e Issue macaroons as opaque auth tokens
This just replaces random bytes with macaroons. The macaroons are not
inspected by the client or server.

In particular, they claim to have an expiry time, but nothing verifies
that they have not expired.

Follow-up commits will actually enforce the expiration, and allow for
token refresh.

See https://bit.ly/matrix-auth for more information
2015-08-18 14:22:02 +01:00
Erik Johnston 261ccd7f5f Fix tests 2015-06-12 17:17:29 +01:00
Mark Haines f1b83d88a3 Discard unused NotifierUserStreams 2015-05-13 16:54:02 +01:00
Mark Haines 63878c0379 Don't bother checking for updates if the stream token hasn't advanced for a user 2015-05-13 13:42:21 +01:00
Erik Johnston 9236136f3a Make work in both Maria and SQLite. Fix tests 2015-04-01 14:12:33 +01:00
Erik Johnston 5f4c28d313 Update tests 2015-02-19 14:34:32 +00:00
Erik Johnston 5358966a87 Use git aware version string in User-Agent and Server headers 2015-02-18 16:52:04 +00:00
Mark Haines f5a70e0d2e Add a cache for get_event 2015-02-11 15:01:15 +00:00
Mark Haines 896253e085 Factor out some of the common homeserver setup code into a
setup_test_homeserver function in utils.
2015-02-11 11:37:30 +00:00
Paul "LeoNerd" Evans cf7e723808 Have MockClock detect attempts to cancel expired timers, to prevent a repeat of SYN-230 2015-01-13 16:58:36 +00:00
Erik Johnston 3c77d13aa5 Kill off synapse.api.events.* 2014-12-16 11:29:05 +00:00
Erik Johnston 1fc2a0e33e Fix tests and remove debug logging 2014-12-12 15:08:29 +00:00
Paul "LeoNerd" Evans 4551afc6d2 Implement .cancel_call_later() in MockClock 2014-12-10 19:26:52 +00:00
Paul "LeoNerd" Evans 38da9884e7 Implement .call_later() in MockClock 2014-12-10 19:24:12 +00:00
Mark Haines 66104da10c Sign outgoing PDUs. 2014-10-16 00:09:48 +01:00
Mark Haines 25d80f35f1 Raise a SynapseError if the authorisation header is missing or malformed 2014-10-13 15:53:18 +01:00
Mark Haines 6684855767 Verify signatures for server2server requests 2014-10-13 14:37:46 +01:00
Mark Haines 9605593d11 Merge branch 'develop' into server2server_signing
Conflicts:
	synapse/storage/__init__.py
	tests/rest/test_presence.py
2014-09-30 17:55:06 +01:00
Erik Johnston d96cb61f26 Unbreak tests after changing storage API 2014-09-29 15:35:57 +01:00
Erik Johnston 0fdf308874 Track the IP users connect with. Add an admin column to users table. 2014-09-26 16:36:24 +01:00
Mark Haines 52ca867670 Sign federation transactions 2014-09-24 17:25:41 +01:00
Erik Johnston 3d2cca6762 Fix test. 2014-09-24 11:17:43 +01:00
Paul "LeoNerd" Evans 08f5c48fc8 Move SQLiteMemoryDbPool implementation into tests.utils 2014-09-10 16:56:02 +01:00
Matthew Hodgson 8a7c1d6a00 fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org hasn't been incorporated in time for launch. 2014-09-03 17:31:57 +01:00
Erik Johnston a808c06a10 Fix room permissions test 2014-09-02 11:03:03 +01:00
Erik Johnston 3f5ebccbff Fix the tests to include new db calls 2014-09-01 19:57:17 +01:00
Paul "LeoNerd" Evans 59d3955db1 Have MemoryDataStore's get_rooms_for_user_where_membership_is() return room membership event objects, as per interface contract 2014-09-01 16:15:45 +01:00
Erik Johnston 5dd38d579b Fix a couple of bugs in presence handler related to pushing updatesto the correct user. Fix presence tests. 2014-08-29 12:08:33 +01:00
Paul "LeoNerd" Evans 113342a756 Ability to assert a DeferredMockCallable has received no calls 2014-08-28 16:40:06 +01:00
Mark Haines 7b079a26a5 Remove get_state_for_room function from federation handler 2014-08-28 15:32:38 +01:00
Mark Haines a03c7f27a8 Fill out prev_events before calling persist_event 2014-08-27 14:32:19 +01:00
Mark Haines 4b63b06cad Merge branch 'develop' into storage_transactions
Conflicts:
	synapse/api/auth.py
	synapse/handlers/room.py
	synapse/storage/__init__.py
2014-08-26 16:07:05 +01:00
Kegan Dougal 8bd55cfdcb Fix ALL THE UNIT TESTS 2014-08-26 15:54:25 +01:00
Mark Haines 1379dcae6f Take a snapshot of the state of the room before performing updates 2014-08-22 17:00:10 +01:00
Erik Johnston 347242a5c4 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	tests/rest/test_presence.py
	tests/rest/test_rooms.py
	tests/utils.py
2014-08-19 14:48:19 +01:00
Paul "LeoNerd" Evans fcdc40a5dd Add a DeferredMockCallable; like mock's MockCallable but allows awaiting
on method calls to be made later
2014-08-19 14:25:43 +01:00
Paul "LeoNerd" Evans bb793019a5 Rename MockHttpServer to MockHttpResource as it stands for one server resource rather than an entire server 2014-08-19 11:16:23 +01:00
Erik Johnston 663a259d64 Change the MemoryDataStore to implement new storage api 2014-08-18 11:08:03 +01:00
Erik Johnston f5fca6f787 Fix some of the tests to reflect changes in the storage layer. 2014-08-15 17:42:21 +01:00
Paul "LeoNerd" Evans a6a9b71da0 Allow advancing the MockClock's time 2014-08-13 19:19:15 +01:00
Paul "LeoNerd" Evans fc778e2bce Move MockClock into tests.utils so we can reüse it 2014-08-13 19:19:15 +01:00