From 3bf423c97f1f4b4de57879354967f46d46b48086 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 10 May 2024 17:29:49 +0200 Subject: [PATCH] assert, that federation-host is present. --- tests/integration/api_activitypub_repository_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/integration/api_activitypub_repository_test.go b/tests/integration/api_activitypub_repository_test.go index 7d8ed55594..3b6f39585d 100644 --- a/tests/integration/api_activitypub_repository_test.go +++ b/tests/integration/api_activitypub_repository_test.go @@ -12,6 +12,8 @@ import ( "time" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/forgefed" + "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/activitypub" forgefed_modules "code.gitea.io/gitea/modules/forgefed" @@ -136,8 +138,13 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { federatedSrv.URL, srv.URL, repositoryID)) t.Logf("activity: %s", activity) resp, err := c.Post(activity, repoInboxURL) + assert.NoError(t, err) assert.Equal(t, http.StatusNoContent, resp.StatusCode) + + federationHost := unittest.AssertExistsAndLoadBean(t, &forgefed.FederationHost{ID: 1}) + assert.Equal(t, "127.0.0.1", federationHost.HostFqdn) + }) }