diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-15 08:13:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 06:13:19 +0000 |
commit | c548dde205244a39a26ba98377c0f5cc11da7041 (patch) | |
tree | f9d9e1185609703e320ed07fd2ff3f95dbdcc230 /tests | |
parent | f8a109440655b77e8554e1744e31bf52a7c63df7 (diff) | |
download | gitea-c548dde205244a39a26ba98377c0f5cc11da7041.tar.gz gitea-c548dde205244a39a26ba98377c0f5cc11da7041.zip |
More refactoring of `db.DefaultContext` (#27083)
Next step of #27065
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/api_activitypub_person_test.go | 3 | ||||
-rw-r--r-- | tests/integration/api_packages_chef_test.go | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/integration/api_activitypub_person_test.go b/tests/integration/api_activitypub_person_test.go index 1a8a38ce56..3222dfc807 100644 --- a/tests/integration/api_activitypub_person_test.go +++ b/tests/integration/api_activitypub_person_test.go @@ -11,6 +11,7 @@ import ( "net/url" "testing" + "code.gitea.io/gitea/models/db" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/activitypub" "code.gitea.io/gitea/modules/setting" @@ -96,7 +97,7 @@ func TestActivityPubPersonInbox(t *testing.T) { user1, err := user_model.GetUserByName(ctx, username1) assert.NoError(t, err) user1url := fmt.Sprintf("%s/api/v1/activitypub/user-id/1#main-key", srv.URL) - c, err := activitypub.NewClient(user1, user1url) + c, err := activitypub.NewClient(db.DefaultContext, user1, user1url) assert.NoError(t, err) user2inboxurl := fmt.Sprintf("%s/api/v1/activitypub/user-id/2/inbox", srv.URL) diff --git a/tests/integration/api_packages_chef_test.go b/tests/integration/api_packages_chef_test.go index 0ee43e1741..4a1fe2607e 100644 --- a/tests/integration/api_packages_chef_test.go +++ b/tests/integration/api_packages_chef_test.go @@ -83,7 +83,7 @@ kPuCu6vH9brvOuYo0q8hLVNkBeXcimRpsDjLhQYzEJjoMTbaiVGnjBky+PWNiofJ nwIDAQAB -----END PUBLIC KEY-----` - err := user_model.SetUserSetting(user.ID, chef_module.SettingPublicPem, pubPem) + err := user_model.SetUserSetting(db.DefaultContext, user.ID, chef_module.SettingPublicPem, pubPem) assert.NoError(t, err) t.Run("Authenticate", func(t *testing.T) { |