Skip to content

Use skip_disk_validation for projects in tests

Jan Provaznik requested to merge jprovazn-skip-disk-validation into master

Based on discussion in #40900 (closed) this patch enables by default skip_disk_validation option for all projects when running tests.

Project creation fails by default if a repository with the same name already exists on disk. This may cause problems in tests which re-use a project name because repository is not deleted on disk together when deleting a project.

Instead of explicitly cleanup repositories before tests which create a project with repository (current approach), disk validation is skipped which should be also a little bit faster.

If a test is sensitive about existing repository, "TestEnv.clean_test_path" can be used explicitly around the test to cleanup the repository.

To avoid a regression, TestEnv.clean_test_path is removed only from "before" blocks in this patch (if removed from "after", there is possibility that some test would start failing).

Related to #40900 (closed)

Edited by Jan Provaznik

Merge request reports