]> source.dussan.org Git - gitea.git/commit
Prevent services/mailer/mailer_test.go tests from deleteing data directory (#17941)
authorzeripath <art27@cantab.net>
Fri, 10 Dec 2021 19:43:28 +0000 (19:43 +0000)
committerGitHub <noreply@github.com>
Fri, 10 Dec 2021 19:43:28 +0000 (19:43 +0000)
commitf550e356d6cfe84b2891776d778531afa92ef902
tree2daf491cd4bdc7eeca333b685a335e92a7bf34eb
parent3ca5dc7e32b372d14ff80d96f14b8f6a805862f1
Prevent services/mailer/mailer_test.go tests from deleteing data directory (#17941)

Running `make test-backend` will delete `data/` due to reloading the configuration and resetting the appdatapath.

This PR removes this unnecessary config reload but also adds extra code in to the unittest main to prevent its cleanup from deleting the wrong directory.

Signed-off-by: Andrew Thornton <art27@cantab.net>
models/migrations/migrations_test.go
models/unittest/testdb.go
services/mailer/mailer_test.go