From 1197b944154242ff733c93b346c097d872b37487 Mon Sep 17 00:00:00 2001 From: jeremy Date: Fri, 18 Oct 2019 10:38:23 +1100 Subject: [PATCH 1/2] Update Test documentation about database behaviours This update is based on what I have experienced and this conversation on Slack https://silverstripe-users.slack.com/archives/C6PLF83H9/p1571281365001600 --- docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md index 00808f339..dc74c3735 100644 --- a/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md +++ b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md @@ -61,7 +61,7 @@ documentation. ## Test Databases and Fixtures -SilverStripe tests create their own database when the test starts. New `ss_tmp` databases are created using the same +SilverStripe tests create their own database when the test starts and fixture files are specified. New `ss_tmp` databases are created using the same connection details you provide for the main website. The new `ss_tmp` database does not copy what is currently in your application database. To provide seed data use a [Fixture](fixtures) file. @@ -71,7 +71,7 @@ permissions to create new databases on your server.
-The test database is rebuilt every time one of the test methods is run. Over time, you may have several hundred test +The test database is rebuilt every time one of the test methods is run and cleaned up afterwards. If the test is interrupted the database is not cleaned up, over time, you may have several hundred test databases on your machine. To get rid of them, run `sake dev/tasks/CleanupTestDatabasesTask`.
From 7900d2aeb1c354145df2e9c8df9611368bcf2a75 Mon Sep 17 00:00:00 2001 From: jeremy Date: Fri, 18 Oct 2019 11:23:44 +1100 Subject: [PATCH 2/2] Update docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md Better worded Co-Authored-By: Robbie Averill --- docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md index dc74c3735..82b97c034 100644 --- a/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md +++ b/docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md @@ -71,7 +71,7 @@ permissions to create new databases on your server.
-The test database is rebuilt every time one of the test methods is run and cleaned up afterwards. If the test is interrupted the database is not cleaned up, over time, you may have several hundred test +The test database is rebuilt every time one of the test methods is run and is removed afterwards. If the test is interrupted, the database will not be removed. Over time, you may have several hundred test databases on your machine. To get rid of them, run `sake dev/tasks/CleanupTestDatabasesTask`.