Bump gomatrixserverlib (#353)

* Bump gomatrixserverlib

Mostly because I want to use Erik's go-faster jsoning.

* Update KeyDB for new KeyFetcher API

we now need to implement FetcherName.

* Attempt to fix integ tests

CanonicalJSON doesn't like the empty string, apparently, and anyway
canonicalising it is pointless.

* More integ test fix
This commit is contained in:
Richard van der Hoff 2017-11-27 12:05:14 +00:00 committed by GitHub
parent 9e352e7311
commit 0786318a04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 7126 additions and 126 deletions

View file

@ -239,7 +239,7 @@ func testDownload(host, origin, mediaID string, wantedStatusCode int, serverCmdC
testReq := &test.Request{
Req: req,
WantedStatusCode: wantedStatusCode,
WantedBody: test.CanonicalJSONInput([]string{""})[0],
WantedBody: "",
}
testReq.Run(fmt.Sprintf("download mxc://%v/%v from %v", origin, mediaID, host), timeout, serverCmdChan)
}
@ -263,7 +263,7 @@ func testThumbnail(width, height int, resizeMethod, host string, serverCmdChan c
testReq := &test.Request{
Req: req,
WantedStatusCode: 200,
WantedBody: test.CanonicalJSONInput([]string{""})[0],
WantedBody: "",
}
testReq.Run(fmt.Sprintf("thumbnail mxc://%v/%v%v from %v", testOrigin, testMediaID, query, host), timeout, serverCmdChan)
}

View file

@ -44,6 +44,11 @@ func NewDatabase(dataSourceName string) (*Database, error) {
return d, nil
}
// FetcherName implements KeyFetcher
func (d Database) FetcherName() string {
return "KeyDatabase"
}
// FetchKeys implements gomatrixserverlib.KeyDatabase
func (d *Database) FetchKeys(
ctx context.Context,