From 0665c1252e85e63f0a05cd107fa4ce8ab092df12 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 10 May 2024 16:25:54 +0200 Subject: [PATCH] make start time more flexible --- tests/integration/api_activitypub_repository_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/api_activitypub_repository_test.go b/tests/integration/api_activitypub_repository_test.go index 1bc140a95e..a2e42bf904 100644 --- a/tests/integration/api_activitypub_repository_test.go +++ b/tests/integration/api_activitypub_repository_test.go @@ -9,6 +9,7 @@ import ( "net/http/httptest" "net/url" "testing" + "time" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/user" @@ -99,11 +100,12 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { activity := []byte(fmt.Sprintf( `{"type":"Like",`+ - `"startTime":"2024-03-27T00:00:01Z",`+ + `"startTime":"%s",`+ `"actor":"%s/api/v1/activitypub/user-id/2",`+ `"object":"%s/api/v1/activitypub/repository-id/%v"}`, - //time.Now().Format(time.RFC3339), + time.Now().UTC().Format(time.RFC3339), srv.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)