Maximilian Seifert
fa3a6e2787
Merge branch 'master' into fix-database-errors-601
2019-09-25 20:54:03 +02:00
Maximilian Seifert
f6ac51bad6
Fix broken local DB test
...
Committing transactions DOES help, who could have foreseen this.
Also: expose the PostgreSQL port 5432 to local 15432 via docker-compose
file. Please point me to a cleaner solution, as that port-mapping is clearly not
required except for testing.
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-30 23:18:49 +02:00
Alex Chen
5e25f6ba22
Set up queryAPI in federationsender ( #791 )
2019-08-24 01:25:10 +08:00
Alex Chen
43308d2f3f
Associate transactions with session IDs instead of device IDs ( #789 )
2019-08-24 00:55:40 +08:00
Alex Chen
5eb63f1d1e
Add joined hosts query APIs ( #781 )
...
This adds two joined hosts query APIs to the federation sender for use of other components.
2019-08-22 19:47:52 +08:00
Maximilian Seifert
e58a7c92e9
Add passing test to testfile
2019-08-20 20:47:40 +02:00
Maximilian Seifert
81126c21d9
Fix broken symbols due to rename
...
Also: rename SyncServerDatabase to SyncServerDatasource in comment in
syncserver.go
2019-08-20 20:46:50 +02:00
Maximilian Seifert
9f63d9f0c3
Return nil early on fail
2019-08-20 20:46:50 +02:00
Maximilian Seifert
5c8296236d
Remove superfluous scripts and docker-compose-test
...
This MR should now comply with the current environment as Travis-CI is
no longer in use.
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
050e44cfd0
Initially connect to postgres DB when creating dendrite DB
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
e53c293a70
go fmt && fix dataSources
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
7edf1a038a
Use travis' postgres for testing
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
8b8b55d0a6
Correction of database connector string
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
db50a1d69e
Run travis tests in monolith_test
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
80d3ad96b2
Alter test data to pass sanitation checks
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
812aec1829
Cleanup code according to lint
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
101f922ddc
Select db connect string according to execution environment
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
b617eee4cb
Add simple tests to validate bugfix ( #601 )
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
329900f644
Add docker-compose file for executing tests
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
ab8e687ca0
Add test cases for CreateDevice and GetDevicesByLocalpart
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
433526b010
Initially connect to postgres DB when creating dendrite DB
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
d52210c5b8
go fmt && fix dataSources
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
202b0fc7c6
Use travis' postgres for testing
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
02ab2fbbb6
Correction of database connector string
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
9abeca94bc
Run travis tests in monolith_test
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
92af2a6b27
Alter test data to pass sanitation checks
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
9242997ae7
Cleanup code according to lint
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
4017ff2871
Select db connect string according to execution environment
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
c5f7000361
Add simple tests to validate bugfix ( #601 )
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
731eee377d
Fix error in "rowsToStreamEvent"
...
Add columns device_id, transaction_id to select statement.
This matches the subsequent call to Scan() and thus prevents the error.
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
6147c72663
Add docker-compose file for executing tests
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
c1f8890f8d
Add test cases for CreateDevice and GetDevicesByLocalpart
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
193933000d
Fill DisplayName field in call to Scan()
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Maximilian Seifert
c522976058
Add DisplayName field to device structure
...
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
2019-08-20 20:46:50 +02:00
Alex Chen
a81917c3e7
Make trailing slash on server key request optional ( #788 )
...
Cherry-picked from 7e861b60fbd721b374ec929926b14e57dc60ec41
2019-08-20 01:01:53 +08:00
Alex Chen
0ed2dd0b15
Fix data race in clientapi/routing/register.go ( #787 )
2019-08-16 12:05:00 +08:00
Parminder Singh
bf5efbc31f
Error when recaptcha enabled with empty configs ( #786 )
2019-08-16 01:59:17 +08:00
Alex Chen
d63d2a50cd
Replace event content types with ones in gomatrixserverlib ( #785 )
...
The types that are not in gomatrixserverlib are not replaced.
This also updates the gomatrixserverlib dependency.
2019-08-16 01:45:11 +08:00
Parminder Singh
d21a2fb152
Add auth fallback endpoint ( #405 )
...
Also adds support for the recaptcha auth type.
2019-08-15 01:34:49 +08:00
Alex Chen
28f60bec4e
Update name of a passing test in testfile ( #784 )
2019-08-14 21:44:34 +08:00
Victor Cuadrado Juan
386cc975f0
Add typingserver service to docker-compose ( #692 )
...
Signed-off-by: Víctor Cuadrado Juan <me@viccuad.me>
2019-08-09 11:30:38 +01:00
Alex Chen
aa0d22bf50
Implement client single event retrieval ( #693 )
2019-08-09 17:45:54 +08:00
Thibaut CHARLES
5716cd60b5
Add filtering database API to syncapi account data table ( #513 )
2019-08-08 13:10:42 +08:00
Andrew Morgan
76040bfa87
Add CI information to CONTRIBUTING.md ( #778 )
...
Add information about how the continuous integration is set up in Dendrite and how to run the tests locally so that people don't need to wait around for things to churn.
2019-08-07 11:46:36 +01:00
Thibaut CHARLES
76e4ebaf78
State events filtering database api ( #438 )
...
This PR adds a gomatrixserverlib.Filter parameter to functions handling the syncapi_current_room_state table. It does not implement any filtering logic inside the syncapi IncrementalSync/CompleteSync functions, just the APIs for future use.
Default filters are provided as placeholders in IncrementalSync/CompleteSync, so behaviour should be unchanged (except the default 20 event limit)
SQL table will be changed. You can upgrade an existing database using:
```
ALTER TABLE syncapi_current_room_state ADD COLUMN IF NOT EXISTS sender text;
UPDATE syncapi_current_room_state SET sender=(event_json::json->>'sender');
ALTER TABLE syncapi_current_room_state ALTER COLUMN sender SET NOT NULL;
ALTER TABLE syncapi_current_room_state ADD COLUMN IF NOT EXISTS contains_url bool;
UPDATE syncapi_current_room_state SET contains_url=(event_json::json->>'content')::json->>'url' IS NOT NULL;
ALTER TABLE syncapi_current_room_state ALTER COLUMN contains_url SET NOT NULL;
```
Note: This depends on #436 (and includes all its commits). I'm not sure if Github will remove the duplicated commits once #436 is merged.
2019-08-07 11:12:09 +01:00
Alex Chen
94ea325c93
Fix permission and 404 response for alias deletion - #654 ( #706 )
2019-08-07 11:00:58 +08:00
Andrew Morgan
8c721b555e
Scope the buildkite build badge only to tests running on master ( #779 )
2019-08-06 20:26:15 +01:00
Alex Chen
324ca22b35
Implement profile retrieval over federation ( #726 )
2019-08-07 00:02:12 +08:00
Alex Chen
66bf615360
Fix transaction IDs in transaction cache have global scope ( #772 )
2019-08-06 23:33:53 +08:00
Andrew Morgan
83f8e05032
Add /event/ on non world readable room does not work ( #777 )
2019-08-06 15:52:04 +01:00