Merge SenderID & Per Room User Key work (#3109)
This commit is contained in:
parent
7a2e325d10
commit
e4665979bf
75 changed files with 801 additions and 379 deletions
|
|
@ -163,12 +163,17 @@ func TestUserRoomKeys(t *testing.T) {
|
|||
gotKey, err = db.SelectUserRoomPrivateKey(context.Background(), *userID, *roomID)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, key, gotKey)
|
||||
pubKey, err := db.SelectUserRoomPublicKey(context.Background(), *userID, *roomID)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, key.Public(), pubKey)
|
||||
|
||||
// Key doesn't exist, we shouldn't get anything back
|
||||
assert.NoError(t, err)
|
||||
gotKey, err = db.SelectUserRoomPrivateKey(context.Background(), *userID, *doesNotExist)
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, gotKey)
|
||||
pubKey, err = db.SelectUserRoomPublicKey(context.Background(), *userID, *doesNotExist)
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, pubKey)
|
||||
|
||||
queryUserIDs := map[spec.RoomID][]ed25519.PublicKey{
|
||||
*roomID: {key.Public().(ed25519.PublicKey)},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue