Integration tests fail if LANG is not "" #8263

Closed
opened 2025-11-02 08:00:02 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @6543 on GitHub (Dec 18, 2021).

gitea version: 9296baf

to reproduce:

export LANG=de_DE.UTF-8
make test-sqlite

expected: they should pass

affected tests:

  • TestAPILFSBatch/Download/MetaNotFound (api_repo_lfs_test.go:186 - should be false)
  • TestAPILFSUpload/AlreadyExistsInStore (api_repo_lfs_test.go:360 - should be false)
  • TestMirrorPush (mirror_push_test.go:51 - hould have 1 item(s), but has 2; mirror_push_test.go:54 - should be true)
  • TestCreateNewTagProtected/API (repo_tag_test.go:33, unexpected error)
Originally created by @6543 on GitHub (Dec 18, 2021). gitea version: 9296baf to reproduce: ``` export LANG=de_DE.UTF-8 make test-sqlite ``` expected: they should pass affected tests: - TestAPILFSBatch/Download/MetaNotFound (api_repo_lfs_test.go:186 - should be false) - TestAPILFSUpload/AlreadyExistsInStore (api_repo_lfs_test.go:360 - should be false) - TestMirrorPush (mirror_push_test.go:51 - hould have 1 item(s), but has 2; mirror_push_test.go:54 - should be true) - TestCreateNewTagProtected/API (repo_tag_test.go:33, unexpected error)
GiteaMirror added the type/testingtype/bug labels 2025-11-02 08:00:02 -06:00
Author
Owner

@Gusted commented on GitHub (Dec 19, 2021):

  • TestAPILFSUpload/AlreadyExistsInStore (api_repo_lfs_test.go:360 - should be false)

Interesting one, it seems like the pointer does exist, but this is because once the test it done, it doesn't clean this pointer(which is created in the same test). So on the first-run, this test passes, but on all following runs it will fail because this pointer is already created.

I guess this test should clean this pointer afterwards?

PS. this doesn't seem to relate to LANG, it all seems to be bugs whereby you aren't on the first-run(a reason why drone CI doesn't pick up on those errors).

@Gusted commented on GitHub (Dec 19, 2021): > * TestAPILFSUpload/AlreadyExistsInStore (api_repo_lfs_test.go:360 - should be false) Interesting one, it seems like the pointer does exist, but this is because once the test it done, it doesn't clean this pointer(which is created in the same test). So on the first-run, this test passes, but on all following runs it will fail because this pointer is already created. I guess this test should clean this pointer afterwards? PS. this doesn't seem to relate to LANG, it all seems to be bugs whereby you aren't on the first-run(a reason why drone CI doesn't pick up on those errors).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8263