MCPcopy Create free account
hub / github.com/daodst/chat / mustCreateTransaction

Function mustCreateTransaction

federationapi/routing/send_test.go:186–198  ·  view source on GitHub ↗
(rsAPI api.FederationRoomserverAPI, fedClient txnFederationClient, pdus []json.RawMessage)

Source from the content-addressed store, hash-verified

184}
185
186func mustCreateTransaction(rsAPI api.FederationRoomserverAPI, fedClient txnFederationClient, pdus []json.RawMessage) *txnReq {
187 t := &txnReq{
188 rsAPI: rsAPI,
189 keys: &test.NopJSONVerifier{},
190 federation: fedClient,
191 roomsMu: internal.NewMutexByRoom(),
192 }
193 t.PDUs = pdus
194 t.Origin = testOrigin
195 t.TransactionID = gomatrixserverlib.TransactionID(fmt.Sprintf("%d", time.Now().UnixNano()))
196 t.Destination = testDestination
197 return t
198}
199
200func mustProcessTransaction(t *testing.T, txn *txnReq, pdusWithErrors []string) {
201 res, err := txn.processTransaction(context.Background())

Callers 2

TestBasicTransactionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected