mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-14 20:39:50 +02:00
fix test-timeout for TestFederationHttpSigValidation
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"forgejo.org/models/db"
|
||||
"forgejo.org/models/forgefed"
|
||||
@@ -17,6 +18,7 @@ import (
|
||||
"forgejo.org/modules/setting"
|
||||
"forgejo.org/modules/test"
|
||||
"forgejo.org/routers"
|
||||
"forgejo.org/services/contexttest"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -32,10 +34,11 @@ func TestFederationHttpSigValidation(t *testing.T) {
|
||||
|
||||
user1 := unittest.AssertExistsAndLoadBean(t, &user.User{ID: 1})
|
||||
|
||||
clientFactory, err := activitypub.GetClientFactory(db.DefaultContext)
|
||||
ctx, _ := contexttest.MockAPIContext(t, userURL)
|
||||
clientFactory, err := activitypub.NewClientFactoryWithTimeout(60 * time.Second)
|
||||
require.NoError(t, err)
|
||||
|
||||
apClient, err := clientFactory.WithKeys(db.DefaultContext, user1, user1.KeyID())
|
||||
apClient, err := clientFactory.WithKeys(ctx, user1, user1.KeyID())
|
||||
require.NoError(t, err)
|
||||
|
||||
// Unsigned request
|
||||
|
||||
Reference in New Issue
Block a user