Mark Haines
7256def8e4
Merge rest servlets into the client json resource object
2015-01-23 10:37:38 +00:00
Paul "LeoNerd" Evans
3a243c53f4
Rename MockedDatastoreTestCase to MockedDatastorePresenceTestCase since it is still presence-specific
2015-01-22 20:06:28 +00:00
Paul "LeoNerd" Evans
cbb10879cb
Much merging of test case setUp() methods to make them much more
...
shareable
2015-01-22 20:06:28 +00:00
Mark Haines
53584420a5
Move client rest tests back under rest
2015-01-22 16:13:27 +00:00
Mark Haines
97c68c508d
Move rest APIs back under the rest directory
2015-01-22 16:10:07 +00:00
Mark Haines
1d2016b4a8
Move client v1 api rest servlets into a "client/v1" directory
2015-01-22 14:59:08 +00:00
Mark Haines
16bfabb9c5
Fix manifest. Ignore contrib and docs directories when checking manifest against source control.
2015-01-22 14:32:51 +00:00
Paul "LeoNerd" Evans
73315ce9de
Abstract out the room ID from presence tests, so it's stored in self
2015-01-21 20:01:57 +00:00
Paul "LeoNerd" Evans
dbe71e670c
Use common base class for two Presence unit-tests, avoiding boilerplate copypasta
2015-01-21 16:58:16 +00:00
Erik Johnston
6dcade97be
Implement new state resolution algorithm
2015-01-21 16:27:04 +00:00
Mark Haines
5fed042640
Finish renaming "context" to "room_id" in federation codebase
2015-01-16 19:01:03 +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
Mark Haines
3891597eb3
Remove unused functions
2015-01-13 15:57:26 +00:00
Paul "LeoNerd" Evans
9c804bc3fd
Check that setting typing notification still works after explicit timeout at REST layer - SYN-230
2015-01-12 18:31:48 +00:00
Paul "LeoNerd" Evans
db72a07ef5
Don't make @unittest.DEBUG print the huge amount of verbosity generated by the synapse.storage loggers
2015-01-12 18:16:27 +00:00
Paul "LeoNerd" Evans
968dc988f9
Check that setting typing notification still works after explicit timeout - SYN-230
2015-01-12 18:01:49 +00:00
Kegan Dougal
a09882de83
Update tests
2015-01-07 16:12:14 +00:00
Kegan Dougal
4640239d34
Mock ratelimiter to make tests pass.
2014-12-19 17:49:47 +00:00
Mark Haines
041ac476a5
Supply auth_chain along with current state in '/state/', fetch auth events from a remote server if we are missing some of them
2014-12-18 18:47:13 +00:00
Mark Haines
dbe77ec79a
Replace distributor deferred list, with a simple for loop until I understand why the former breaks and the latter doesn't
2014-12-18 17:47:00 +00:00
Mark Haines
c3eae8a88c
Construct the EventContext in the state handler rather than constructing one and then immediately calling state_handler.annotate_context_with_state
2014-12-16 15:59:17 +00:00
Mark Haines
8b8beba194
Remove annotate_event_with_state as nothing was using it. Update state tests to call annotate_context_with_state
2014-12-16 15:08:37 +00:00
Erik Johnston
3c77d13aa5
Kill off synapse.api.events.*
2014-12-16 11:29:05 +00:00
Erik Johnston
cf6e5f1dbf
Rename MessageHandler.handle_event. Add a few comments.
2014-12-15 17:01:12 +00:00
Erik Johnston
65cdf4e724
Get current member state from current_state snapshot. Fix leave test.
2014-12-15 15:03:27 +00:00
Erik Johnston
57e0e619f3
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
...
Conflicts:
tests/handlers/test_room.py
2014-12-15 14:45:59 +00:00
Erik Johnston
1fc2a0e33e
Fix tests and remove debug logging
2014-12-12 15:08:29 +00:00
Erik Johnston
ebf2ec3ce6
Fix membership handler test
2014-12-12 14:32:44 +00:00
Erik Johnston
41ff21c907
Fix test.
2014-12-12 14:10:32 +00:00
Paul "LeoNerd" Evans
b0bb1756a9
Send list of typing user IDs as 'user_ids' list within 'content', so that m.typing stream events have a toplevel content, for consistency with others
2014-12-12 11:59:46 +00:00
Erik Johnston
fa4b610ae3
Fix stream test. Make sure we add join to auth_events for invitiations
2014-12-12 10:42:27 +00:00
Paul "LeoNerd" Evans
f25764943c
Add a 'user_left_room' distributor signal analogous to 'user_joined_room'
2014-12-11 18:27:01 +00:00
Paul "LeoNerd" Evans
5ebc994f84
Actually auth-check to ensure people can only send typing notifications for rooms they're actually in
2014-12-11 18:11:43 +00:00
Paul "LeoNerd" Evans
6e1531682b
Move typing-notification REST tests into their own .py file
2014-12-11 17:54:42 +00:00
Paul "LeoNerd" Evans
1f26e56de0
Actually unit-test the event stream around REST typing tests
2014-12-11 17:54:42 +00:00
Erik Johnston
cde840a82c
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
...
Conflicts:
setup.py
2014-12-11 17:48:48 +00:00
Erik Johnston
3fecacd86b
Fix replication tests
2014-12-11 17:11:06 +00:00
Erik Johnston
d3eb12c7b8
Fix federation test
2014-12-11 17:01:27 +00:00
Erik Johnston
c161b6cf96
Fix room creation test
2014-12-11 16:43:30 +00:00
Paul "LeoNerd" Evans
3b2cc26053
Initial hack at unit tests of room typing REST API
2014-12-11 16:03:12 +00:00
Erik Johnston
9191292b0f
Fix prev_content
2014-12-11 15:16:55 +00:00
Erik Johnston
e72b16f9a3
Fix redaction tests
2014-12-11 13:38:52 +00:00
Erik Johnston
8cdebce470
Fix redactions. Fix 'age' key
2014-12-11 13:25:19 +00:00
Paul "LeoNerd" Evans
1a75ff5c23
Hook up the event stream to typing notifications
2014-12-10 21:01:49 +00:00
Paul "LeoNerd" Evans
4006d58335
Store serial numbers per room for typing event stream purposes
2014-12-10 20:48:25 +00:00
Paul "LeoNerd" Evans
9eb819e828
First hack at implementing timeouts in typing notification handler
2014-12-10 19:39:01 +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
Paul "LeoNerd" Evans
be9a8d68e0
Trivial test of MockClock()
2014-12-10 19:13:50 +00:00
Erik Johnston
4d6af0dde3
Fix some tests
2014-12-10 18:00:57 +00:00
Erik Johnston
08aceea82e
Add newline back in
2014-12-10 10:26:12 +00:00
Erik Johnston
f26ec14b21
Remove whitespace
2014-12-10 10:25:21 +00:00
Matthew Hodgson
8ada2d2018
fix UTs by telling all the mock stores about the new methods for tracking retries
2014-12-09 23:53:07 +00:00
Erik Johnston
027542e2e5
Fix bugs when joining a remote room that has dodgy event graphs. This should also fix the number of times a HS will trigger a GET /event/
2014-11-27 16:02:26 +00:00
Erik Johnston
822b15ea43
Fix tests.
2014-11-26 10:45:37 +00:00
Erik Johnston
64fc859dac
Fix bugs in invite/join dances.
...
We now do more implement more of the auth on the events so that we
don't reject valid events.
2014-11-25 17:59:49 +00:00
Erik Johnston
a46e5ef621
SYN-163: Add an order by rowid to selects.
...
This should fix the bug where the edges of the graph get returned in a
different order than they were inserted in, and so no get_event no
longer returned the exact same JSON as was inserted. This meant that
signature checks failed.
2014-11-24 10:56:36 +00:00
Erik Johnston
493055731e
Fix tests from prev commit
2014-11-19 18:00:07 +00:00
Paul "LeoNerd" Evans
03dc63f6c8
Initialise UserPresenceCache instances to always contain a 'presence' key
2014-11-19 17:31:46 +00:00
Mark Haines
c5eabe3143
replace user_id with sender
2014-11-19 16:38:40 +00:00
Paul "LeoNerd" Evans
33d328d967
Include room members' presence in room initialSync
2014-11-18 15:28:58 +00:00
Paul "LeoNerd" Evans
17f977a9de
Include 'messages' snapshot in room initialSync
2014-11-18 14:07:51 +00:00
Paul "LeoNerd" Evans
31a049eb69
Merge branch 'develop' into room-initial-sync
...
Conflicts:
synapse/handlers/message.py
2014-11-17 16:59:24 +00:00
Mark Haines
cb4b6c844a
Merge PDUs and Events into one object
2014-11-14 21:25:02 +00:00
Mark Haines
de1ec90133
Validate signatures on incoming events
2014-11-14 19:11:04 +00:00
Mark Haines
e903c941cb
Merge branch 'develop' into request_logging
...
Conflicts:
setup.py
synapse/storage/_base.py
synapse/util/async.py
2014-11-14 11:16:50 +00:00
Mark Haines
8d8a133c89
SYN-103: Remove "origin" and "destination" keys from edus
2014-11-13 15:49:03 +00:00
Erik Johnston
6fea478d2e
Fix bugs with invites/joins across federatiom.
...
Both in terms of auth and not trying to fetch missing PDUs for invites,
joins etc.
2014-11-12 11:24:11 +00:00
Erik Johnston
37900a92db
Only allow people in a room to look up room state.
2014-11-11 17:55:32 +00:00
Erik Johnston
3db2c0d43e
Rename annotate_state_groups to annotate_event_with_state
2014-11-11 16:58:53 +00:00
Erik Johnston
02ebb9f0c3
Fix state tests
2014-11-11 14:16:48 +00:00
Erik Johnston
ed8b7d400c
Fix validation tests
2014-11-11 10:31:59 +00:00
Erik Johnston
339c11dd86
Fix rest.test_rooms
2014-11-11 08:09:42 +00:00
Paul "LeoNerd" Evans
c23afed39a
Include room membership in room initialSync
2014-11-10 19:34:47 +00:00
Paul "LeoNerd" Evans
1fd8139138
Put room state in room initialSync output - I guess this is right; I really can't find any other tests similar...
2014-11-10 19:29:58 +00:00
Paul "LeoNerd" Evans
269f80bf8e
Have room initialSync return the room's room_id
2014-11-10 19:02:19 +00:00
Paul "LeoNerd" Evans
50c8e3fcda
Initial (empty) test that room initialSync at least returns 200 OK
2014-11-10 18:07:55 +00:00
Erik Johnston
ec824927c1
Fix rest.test_events. Convert to use SQLiteMemoryDbPool
2014-11-10 15:37:53 +00:00
Erik Johnston
4ebdb19682
Fix SQLBaseStoreTestCase
2014-11-10 15:32:35 +00:00
Erik Johnston
3cd9c02f71
Fix stream test.
2014-11-10 15:29:19 +00:00
Erik Johnston
e2cebe26e8
Fix room_member storage test
2014-11-10 15:24:15 +00:00
Erik Johnston
c174d19d1e
Fix redaction storage test
2014-11-10 15:21:41 +00:00
Erik Johnston
b01159f234
Fix room handler test
2014-11-10 14:58:33 +00:00
Erik Johnston
3791b75000
Fix a couple more storage tests
2014-11-05 13:48:36 +00:00
Erik Johnston
2fcce3b3c5
Remove stale tests
2014-11-05 13:43:36 +00:00
Erik Johnston
da80ebcc6b
Fix redaction storage test
2014-11-05 13:28:57 +00:00
Erik Johnston
1616df2f61
Fix typing tests
2014-11-05 11:15:56 +00:00
Erik Johnston
c670ce416b
Fix room tests
2014-11-05 11:15:15 +00:00
Erik Johnston
f48fce8bd3
Fix profile tests
2014-11-05 11:13:58 +00:00
Erik Johnston
24e2da4557
Fix presencelike test
2014-11-05 11:13:01 +00:00
Erik Johnston
416ab4ebf0
Don't execute empty tests. Formatting.
2014-11-05 11:12:47 +00:00
Erik Johnston
34c4614682
Fix presence test
2014-11-05 11:10:54 +00:00
Erik Johnston
9e429239ab
Fix Federation test
2014-11-05 11:10:36 +00:00
Erik Johnston
4a5e95511e
PEP8
2014-11-04 17:13:21 +00:00
Erik Johnston
dfb3d21a6d
Fix room handler tests
2014-11-04 17:12:39 +00:00
Erik Johnston
b0554682ed
Fix federation handler tests. I've removed the invite/join dance ones as they are completely out of date.
2014-11-04 16:51:59 +00:00
Erik Johnston
7f4c7fe4e8
PEP8
2014-11-04 16:35:38 +00:00
Erik Johnston
dd3711bdbd
Fix tests.handlers.test_directory
2014-11-04 16:33:52 +00:00
Erik Johnston
b15e8d5bbc
event <-> pdu mappings are now trivial and will soon be scrapped
2014-11-04 16:20:02 +00:00
Erik Johnston
24305ba5bf
Fix up federation tests
2014-11-04 16:15:30 +00:00
Erik Johnston
ef9c4476a0
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
2014-10-30 11:18:28 +00:00
Mark Haines
7c06399512
Merge branch 'develop' into request_logging
...
Conflicts:
synapse/config/logger.py
2014-10-30 11:13:58 +00:00
Mark Haines
b29517bd01
Add a request-id to each log line
2014-10-30 01:21:33 +00:00
Paul "LeoNerd" Evans
b1ee6fd7ed
Fix an off-by-one bug in presence event stream pagination; this might be responsible for any number of bug reports
2014-10-29 16:16:01 +00:00
Mark Haines
dc3c2823ac
Merge branch 'develop' into event_signing
...
Conflicts:
synapse/federation/replication.py
2014-10-17 17:33:58 +01:00
Mark Haines
82c5820767
keep 'origin_server_ts' as 'ts' in the database to avoid needlessly updating schema
2014-10-17 17:31:48 +01:00
Mark Haines
f5cf7ac25b
SPEC-7: Rename 'ts' to 'origin_server_ts'
2014-10-17 17:12:25 +01:00
Mark Haines
bb04447c44
Include hashes of previous pdus when referencing them
2014-10-16 23:25:12 +01:00
Mark Haines
66104da10c
Sign outgoing PDUs.
2014-10-16 00:09:48 +01:00
Mark Haines
1c445f88f6
persist hashes and origin signatures for PDUs
2014-10-15 17:09:04 +01:00
Mark Haines
9aed791fc3
SYN-103: Ignore the 'origin' key in received EDUs. Instead take the origin from the transaction itself
2014-10-14 16:44:27 +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
10ef8e6e4b
SYN-75 sign at the request level rather than the transaction level
2014-10-13 11:49:55 +01:00
Mark Haines
984e207b59
Merge branch develop into server2server_signing
...
Conflicts:
synapse/app/homeserver.py
2014-10-13 10:58:50 +01:00
Kegan Dougal
868eb478d8
Fixed test.
2014-10-09 15:55:07 +01:00
Kegan Dougal
3db09c4d15
Still broken.
2014-10-09 15:53:40 +01:00
Kegan Dougal
83c53113af
Break a test.
2014-10-09 15:51:05 +01:00
Kegan Dougal
72aef114ab
Fix unit test.
2014-10-08 15:18:19 +01:00
Kegan Dougal
6045bd89fb
Break unit test.
2014-10-08 15:16:03 +01:00
Mark Haines
574377636e
Add a keyword argument to get_json to avoid retrying on DNS failures. Rather than passing MatrixHttpClient.RETRY_DNS_LOOKUP_FAILURES as a fake query string parameter
2014-10-02 14:26:13 +01:00
Mark Haines
4f11518934
Split PlainHttpClient into separate clients for talking to Identity servers and talking to Capatcha servers
2014-10-02 14:03:26 +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
Mark Haines
b95a178584
SYN-75 Verify signatures on server to server transactions
2014-09-30 15:15:10 +01:00
Erik Johnston
e06adc6d7e
SYN-2: Allow server admins to delete room aliases
2014-09-30 11:31:42 +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
Erik Johnston
37bfe44046
Merge branch 'deletions' of github.com:matrix-org/synapse into develop
2014-09-25 17:02:53 +01:00
Erik Johnston
72e80dbe0e
Rename redaction test case to something helpful
2014-09-25 15:52:23 +01:00
Erik Johnston
59f2bef187
Fix test where we changed arguments used to call the notifier
2014-09-25 13:04:33 +01:00
Erik Johnston
24e4c48468
More tests.
2014-09-25 10:19:16 +01:00
Erik Johnston
2721f5ccc9
Add test for redactions
2014-09-25 10:02:20 +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
Erik Johnston
dcc1965bfe
Test that prev_content get's added if there is a prev_state key (in the event stream).
2014-09-19 16:44:16 +01:00
Erik Johnston
28bcd01e8d
SYN-47: Fix bug where we still returned events for rooms we had left.
...
SYN-47 #resolve
2014-09-19 14:45:21 +01:00
Erik Johnston
335e5d131c
Merge branch 'test-sqlite-memory' of github.com:matrix-org/synapse into develop
...
Conflicts:
tests/handlers/test_profile.py
2014-09-18 14:31:47 +01:00
Paul "LeoNerd" Evans
4571cf7baa
Merge branch 'develop' into test-sqlite-memory
2014-09-17 18:27:47 +01:00
Paul "LeoNerd" Evans
bfae582fa3
Remark on remaining storage modules that still need unit tests
2014-09-17 18:27:30 +01:00
Paul "LeoNerd" Evans
bcf5121937
Neaten more of the storage layer tests with assertObjectHasAttributes; more standardisation on test layout
2014-09-17 16:58:59 +01:00
Paul "LeoNerd" Evans
b588ce920d
Unit tests for (some) room events via the RoomStore
2014-09-17 16:31:11 +01:00
Paul "LeoNerd" Evans
ba41ca45fa
Use new assertObjectHasAttributes() in tests/storage/test_room.py
2014-09-17 16:04:05 +01:00
Paul "LeoNerd" Evans
7aacd6834a
Added a useful unit test primitive for asserting object attributes
2014-09-17 15:56:40 +01:00
Paul "LeoNerd" Evans
de14853237
More RoomStore tests
2014-09-17 15:33:10 +01:00
Erik Johnston
b6818fd4d2
SYN-40: When a user updates their displayname or avatar update all their join events for all the rooms they are currently in.
2014-09-17 15:05:14 +01:00
Paul "LeoNerd" Evans
e32cfed1d8
Initial pass at a RoomStore test
2014-09-15 18:41:24 +01:00
Erik Johnston
59516a8bb1
Correctly handle receiving 'missing' Pdus from federation, rather than just discarding them.
2014-09-15 16:40:44 +01:00
Erik Johnston
0897a09f49
Fix unit tests after adding extra argument on put_json
2014-09-15 16:24:03 +01:00
Kegan Dougal
2c00e1ecd9
Be consistent when associating keys with login types for registration/login.
2014-09-15 15:38:29 +01:00
Kegan Dougal
c04caff55c
Fix unit tests.
2014-09-15 15:14:19 +01:00