mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-05 23:52:46 +00:00
refactor: update GMSL (#3058)
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364 Read this commit by commit to avoid going insane.
This commit is contained in:
parent
9fa39263c0
commit
72285b2659
306 changed files with 2117 additions and 1934 deletions
|
@ -32,12 +32,14 @@ import (
|
|||
"github.com/matrix-org/dendrite/test"
|
||||
"github.com/matrix-org/dendrite/test/testrig"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/gomatrixserverlib/fclient"
|
||||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/crypto/ed25519"
|
||||
)
|
||||
|
||||
const (
|
||||
testOrigin = gomatrixserverlib.ServerName("kaer.morhen")
|
||||
testOrigin = spec.ServerName("kaer.morhen")
|
||||
)
|
||||
|
||||
type sendContent struct {
|
||||
|
@ -70,8 +72,8 @@ func TestHandleSend(t *testing.T) {
|
|||
_, sk, _ := ed25519.GenerateKey(nil)
|
||||
keyID := signing.KeyID
|
||||
pk := sk.Public().(ed25519.PublicKey)
|
||||
serverName := gomatrixserverlib.ServerName(hex.EncodeToString(pk))
|
||||
req := gomatrixserverlib.NewFederationRequest("PUT", serverName, testOrigin, "/send/1234")
|
||||
serverName := spec.ServerName(hex.EncodeToString(pk))
|
||||
req := fclient.NewFederationRequest("PUT", serverName, testOrigin, "/send/1234")
|
||||
content := sendContent{}
|
||||
err := req.SetContent(content)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue