The purpose of this test is to check that receiving an event over federation for which we have the prev_events works correctly, and passes it on to the roomserver. It's the most basic test possible.
(t *testing.T)
| 257 | // The purpose of this test is to check that receiving an event over federation for which we have the prev_events works correctly, and passes it on |
| 258 | // to the roomserver. It's the most basic test possible. |
| 259 | func TestBasicTransaction(t *testing.T) { |
| 260 | rsAPI := &testRoomserverAPI{} |
| 261 | pdus := []json.RawMessage{ |
| 262 | testData[len(testData)-1], // a message event |
| 263 | } |
| 264 | txn := mustCreateTransaction(rsAPI, &txnFedClient{}, pdus) |
| 265 | mustProcessTransaction(t, txn, nil) |
| 266 | assertInputRoomEvents(t, rsAPI.inputRoomEvents, []*gomatrixserverlib.HeaderedEvent{testEvents[len(testEvents)-1]}) |
| 267 | } |
| 268 | |
| 269 | // The purpose of this test is to check that if the event received fails auth checks the event is still sent to the roomserver |
| 270 | // as it does the auth check. |
nothing calls this directly
no test coverage detected