From a40e81b75597039b3ef90e2464efe7a14fc218aa Mon Sep 17 00:00:00 2001 From: xrstf Date: Fri, 6 Feb 2026 20:19:00 +0100 Subject: [PATCH] ensure consistent sort order in TestFeed fixture (#11176) This fixes a flake that my previous PR #10933 introduced. Since no individual feed items were previously asserted in the test, the inconsistent sort order never caused an issue before. Thanks to @mfenniak for pointing me in the right direction. ## Checklist ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [x] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11176 Reviewed-by: Gusted Reviewed-by: Mathieu Fenniak Co-authored-by: xrstf Co-committed-by: xrstf --- tests/integration/fixtures/TestFeed/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/fixtures/TestFeed/action.yml b/tests/integration/fixtures/TestFeed/action.yml index 6458951e61..26285798ad 100644 --- a/tests/integration/fixtures/TestFeed/action.yml +++ b/tests/integration/fixtures/TestFeed/action.yml @@ -14,7 +14,7 @@ comment_id: 1001 repo_id: 1 # public is_private: false - created_unix: 1680454039 + created_unix: 1680454040 content: '["1","Well, this test is short | succinct | distinct."]' # a multi-commit push to validate the format of the generated compare URLs, see #10168 @@ -25,5 +25,5 @@ comment_id: 0 repo_id: 1 # public is_private: false - created_unix: 1680454039 + created_unix: 1680454041 content: '{"Commits":[{"Sha1":"412413fd409fc0cab446e7b59702596e1bde1816","Message":"fourth commit","AuthorEmail":"git@example.com","AuthorName":"dummy","CommitterEmail":"git@example.com","CommitterName":"dummy","Signature":null,"Verification":null,"Timestamp":"2026-01-19T22:07:22+01:00"},{"Sha1":"00a01802439eb2c0391fdfaa2c344b5e25d0b9d4","Message":"third commit","AuthorEmail":"git@example.com","AuthorName":"dummy","CommitterEmail":"git@example.com","CommitterName":"dummy","Signature":null,"Verification":null,"Timestamp":"2026-01-19T22:07:18+01:00"}],"HeadCommit":{"Sha1":"412413fd409fc0cab446e7b59702596e1bde1816","Message":"fourth commit","AuthorEmail":"git@example.com","AuthorName":"dummy","CommitterEmail":"git@example.com","CommitterName":"dummy","Signature":null,"Verification":null,"Timestamp":"2026-01-19T22:07:22+01:00"},"CompareURL":"user2/repo1/compare/ed4090ecc2d9dd16b184763cc476ea1b28afa560...412413fd409fc0cab446e7b59702596e1bde1816","Len":2}'