Commit Graph

65 Commits (2ae91a9e2f5632bcaa32154d457ddd39a96e981e)

Author SHA1 Message Date
Erik Johnston 8aab9d87fa Don't require config to create database 2016-04-06 14:15:45 +01:00
Patrik Oldsberg bb0e82fff1 tests/utils: added room_invite_state_types to test config
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-03-04 10:43:17 +01:00
Daniel Wagner-Hall b4022cc487 Pass whole requester to ratelimiting
This will enable more detailed decisions
2016-03-03 16:43:42 +00:00
Daniel Wagner-Hall 95481e7ba7 Merge pull request #571 from matrix-org/daniel/asids
Mark AS users with their AS's ID
2016-03-03 13:56:28 +00:00
Mark Haines 60a0f81c7a Add a /replication API for extracting the updates that happened on
synapse

This is necessary for replicating the data in synapse to be visible to a
separate service because presence and typing notifications aren't stored
in a database so won't be visible to another process.

This API can be used to either get the raw data by requesting the tables
themselves or to just receive notifications for updates by following the
streams meta-stream.

Returns updates for each table requested a JSON array of arrays with a
row for each row in the table.

Each table is prefixed by a header row with the: name of the table,
current stream_id position for the table, number of rows, number of
columns and the names of the columns.
This is followed by the rows that have been added to the server since
the requester last asked.

The API has a timeout and is hooked up to the notifier so that a slave
can long poll for updates.
2016-03-01 14:49:41 +00:00
Mark Haines 700487a7c7 Fix flake8 warnings for tests 2016-02-19 15:34:38 +00:00
Erik Johnston e5999bfb1a Initial cut 2016-02-17 15:40:50 +00:00
Daniel Wagner-Hall 763360594d Mark AS users with their AS's ID 2016-02-11 17:26:42 +00:00
Daniel Wagner-Hall 5054806ec1 Rename config field to reflect yaml name 2016-02-03 14:42:01 +00:00
Mark Haines f2d5ff5bf2 Fix the mock homserver used in the tests 2016-01-29 14:53:14 +00:00
Erik Johnston 0487c9441f Fix tests 2016-01-27 17:33:13 +00:00
Erik Johnston 9959d9ece8 Remove redundated BaseHomeServer 2016-01-26 13:52:29 +00:00
Matthew Hodgson 6c28ac260c copyrights 2016-01-07 04:26:29 +00:00
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