Description
Description
I've been having a lot of issues with failing integration tests due to the way artifact tests are implemented. It appears that the tests are not properly isolated from one-another. That is, tests depend on other tests running (successfully), and running multiple integration tests on the same file-system clobber each other.
For instance:
Fails, because it depends on TestActionsArtifactDownloadUploadSingle running
make clean build
make test-sqlite#TestActionsArtifactDownload
Passes, because it has a clean environment
make clean build
make test-sqlite#TestActions
(without cleaning) Fails, because there is data persisted.
make test-sqlite#TestActions
Integration tests shouldn't depend on other integration tests to run. Further, they should be cleaned up between each run.
Instead, we should initialize fixtures & data so that the download tests pass independently, and the upload tests use different resource names. This makes the errors more reproduce-able and easier to debug. For instance if a new code change is introduced in both upload and download routines, the tests may pass, but all existing deployments that exist can no longer download, because download wasn't tested independently.
I've started looking into this, but it's not clear initially how the data is being persisted (eg. file-system, db, queue, or some combination).
Gitea Version
release/v1.21
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Locally, sqlite, go 1.21
Database
None