mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Alter test data to pass sanitation checks
Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
This commit is contained in:
parent
9242997ae7
commit
92af2a6b27
|
|
@ -37,7 +37,7 @@ func init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const testEventID = "test-event-id"
|
const testEventID = "$test-event-id:test-domain.example.com"
|
||||||
|
|
||||||
func Test_sanityCheckOutputRoomEvents(t *testing.T) {
|
func Test_sanityCheckOutputRoomEvents(t *testing.T) {
|
||||||
db, err := NewSyncServerDatabase(dataSource)
|
db, err := NewSyncServerDatabase(dataSource)
|
||||||
|
|
@ -67,7 +67,6 @@ func TestSyncServerDatabase_selectEventsWithEventIDs(t *testing.T) {
|
||||||
assert.Condition(t, func() bool {
|
assert.Condition(t, func() bool {
|
||||||
return len(events) > 0
|
return len(events) > 0
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func insertTestEvent(t *testing.T, db *SyncServerDatabase) {
|
func insertTestEvent(t *testing.T, db *SyncServerDatabase) {
|
||||||
|
|
@ -76,13 +75,14 @@ func insertTestEvent(t *testing.T, db *SyncServerDatabase) {
|
||||||
|
|
||||||
keyBytes := []byte("1122334455667788112233445566778811223344556677881122334455667788")
|
keyBytes := []byte("1122334455667788112233445566778811223344556677881122334455667788")
|
||||||
eventBuilder := gomatrixserverlib.EventBuilder{
|
eventBuilder := gomatrixserverlib.EventBuilder{
|
||||||
RoomID: "test-room-id",
|
RoomID: "!test_room_id:test-domain.example.com",
|
||||||
Content: []byte(`{"RawContent": "test-raw-content"}`),
|
Content: []byte(`{"RawContent": "test-raw-content"}`),
|
||||||
|
Sender: "@test-user:test-domain.example.com",
|
||||||
}
|
}
|
||||||
event, err := eventBuilder.Build(
|
event, err := eventBuilder.Build(
|
||||||
testEventID,
|
testEventID,
|
||||||
time.Now(),
|
time.Now(),
|
||||||
"test-server-name",
|
"test-domain.example.com",
|
||||||
"test-key-id",
|
"test-key-id",
|
||||||
keyBytes)
|
keyBytes)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue