From 307b27bbaa3c83bf1b3f57efb730b9bf58b378c2 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 16 May 2024 18:22:09 +0200 Subject: [PATCH] choose a not local avail federated userid --- tests/integration/api_activitypub_repository_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/api_activitypub_repository_test.go b/tests/integration/api_activitypub_repository_test.go index 093f2fd184..acb77378a1 100644 --- a/tests/integration/api_activitypub_repository_test.go +++ b/tests/integration/api_activitypub_repository_test.go @@ -91,7 +91,7 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { `"openRegistrations":true,"usage":{"users":{"total":14,"activeHalfyear":2}},"metadata":{}}`) fmt.Fprint(res, responseBody) }) - federatedRoutes.HandleFunc("/api/v1/activitypub/user-id/2", + federatedRoutes.HandleFunc("/api/v1/activitypub/user-id/15", func(res http.ResponseWriter, req *http.Request) { // curl -H "Accept: application/json" https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/2 responseBody := fmt.Sprintf(`{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],` + @@ -132,7 +132,7 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { activity := []byte(fmt.Sprintf( `{"type":"Like",`+ `"startTime":"%s",`+ - `"actor":"%s/api/v1/activitypub/user-id/2",`+ + `"actor":"%s/api/v1/activitypub/user-id/15",`+ `"object":"%s/api/v1/activitypub/repository-id/%v"}`, time.Now().UTC().Format(time.RFC3339), federatedSrv.URL, srv.URL, repositoryID)) @@ -143,7 +143,7 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { assert.Equal(t, http.StatusNoContent, resp.StatusCode) federationHost := unittest.AssertExistsAndLoadBean(t, &forgefed.FederationHost{HostFqdn: "127.0.0.1"}) - federatedUser := unittest.AssertExistsAndLoadBean(t, &user.FederatedUser{ExternalID: "2", FederationHostID: federationHost.ID}) + federatedUser := unittest.AssertExistsAndLoadBean(t, &user.FederatedUser{ExternalID: "15", FederationHostID: federationHost.ID}) unittest.AssertExistsAndLoadBean(t, &user.User{ID: federatedUser.UserID}) }) }