mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 18:04:14 +01:00
assert, that federation-host is present.
This commit is contained in:
parent
8d330fdb5d
commit
3bf423c97f
1 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/db"
|
"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/models/user"
|
||||||
"code.gitea.io/gitea/modules/activitypub"
|
"code.gitea.io/gitea/modules/activitypub"
|
||||||
forgefed_modules "code.gitea.io/gitea/modules/forgefed"
|
forgefed_modules "code.gitea.io/gitea/modules/forgefed"
|
||||||
|
@ -136,8 +138,13 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) {
|
||||||
federatedSrv.URL, srv.URL, repositoryID))
|
federatedSrv.URL, srv.URL, repositoryID))
|
||||||
t.Logf("activity: %s", activity)
|
t.Logf("activity: %s", activity)
|
||||||
resp, err := c.Post(activity, repoInboxURL)
|
resp, err := c.Post(activity, repoInboxURL)
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, http.StatusNoContent, resp.StatusCode)
|
assert.Equal(t, http.StatusNoContent, resp.StatusCode)
|
||||||
|
|
||||||
|
federationHost := unittest.AssertExistsAndLoadBean(t, &forgefed.FederationHost{ID: 1})
|
||||||
|
assert.Equal(t, "127.0.0.1", federationHost.HostFqdn)
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue