mautrix-go/federation/serverauth_test.go
Tulir Asokan 6da5f6b5d0
Some checks are pending
Go / Lint (latest) (push) Waiting to run
Go / Build (old, libolm) (push) Waiting to run
Go / Build (latest, libolm) (push) Waiting to run
Go / Build (old, goolm) (push) Waiting to run
Go / Build (latest, goolm) (push) Waiting to run
federation: change serverauth test domains
2026-01-10 14:18:57 +02:00

29 lines
805 B
Go

// Copyright (c) 2025 Tulir Asokan
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package federation_test
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"maunium.net/go/mautrix/federation"
)
func TestServerKeyResponse_VerifySelfSignature(t *testing.T) {
cli := federation.NewClient("", nil, nil)
ctx := context.Background()
for _, name := range []string{"matrix.org", "maunium.net", "cd.mau.dev", "uwu.mau.dev"} {
t.Run(name, func(t *testing.T) {
resp, err := cli.ServerKeys(ctx, name)
require.NoError(t, err)
assert.NoError(t, resp.VerifySelfSignature())
})
}
}