mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 21:32:23 +03:00
more test fixes
This commit is contained in:
parent
27f7a5e3eb
commit
c1ad175178
2 changed files with 3 additions and 9 deletions
|
@ -10,8 +10,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/element-hq/dendrite/userapi/types"
|
|
||||||
|
|
||||||
"github.com/element-hq/dendrite/setup/config"
|
"github.com/element-hq/dendrite/setup/config"
|
||||||
"github.com/element-hq/dendrite/test"
|
"github.com/element-hq/dendrite/test"
|
||||||
"github.com/element-hq/dendrite/test/testrig"
|
"github.com/element-hq/dendrite/test/testrig"
|
||||||
|
@ -134,9 +132,7 @@ func Test_UploadCrossSigningDeviceKeys_Unauthorised(t *testing.T) {
|
||||||
},
|
},
|
||||||
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
|
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
|
||||||
"@user:example.com": {
|
"@user:example.com": {
|
||||||
Key: &types.CrossSigningKey{
|
Key: spec.Base64Bytes("key1"),
|
||||||
KeyData: spec.Base64Bytes("key1"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -200,9 +196,7 @@ func Test_UploadCrossSigningDeviceKeys_ExistingKeysMismatch(t *testing.T) {
|
||||||
},
|
},
|
||||||
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
|
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
|
||||||
"@user:example.com": {
|
"@user:example.com": {
|
||||||
Key: &types.CrossSigningKey{
|
Key: spec.Base64Bytes("different_key"),
|
||||||
KeyData: spec.Base64Bytes("different_key"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ const selectCrossSigningKeysForUserAndKeyTypeSQL = "" +
|
||||||
|
|
||||||
const upsertCrossSigningKeysForUserSQL = "" +
|
const upsertCrossSigningKeysForUserSQL = "" +
|
||||||
"INSERT INTO keyserver_cross_signing_keys (user_id, key_type, key_data)" +
|
"INSERT INTO keyserver_cross_signing_keys (user_id, key_type, key_data)" +
|
||||||
" VALUES($1, $2, $3, $4)" +
|
" VALUES($1, $2, $3)" +
|
||||||
" ON CONFLICT (user_id, key_type) DO UPDATE SET key_data = $3"
|
" ON CONFLICT (user_id, key_type) DO UPDATE SET key_data = $3"
|
||||||
|
|
||||||
type crossSigningKeysStatements struct {
|
type crossSigningKeysStatements struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue