mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-19 17:01:12 +00:00
fix test-timeout for TestFederationHttpSigValidation
This commit is contained in:
parent
e736b6a571
commit
555f6e57ad
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue