mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix CleanupTestDatabaseTask
This commit is contained in:
parent
02a87796ff
commit
e2a377e21e
@ -6,20 +6,20 @@
|
|||||||
* @package framework
|
* @package framework
|
||||||
* @subpackage tasks
|
* @subpackage tasks
|
||||||
*/
|
*/
|
||||||
class CleanuPTestDatabasesTask extends BuildTask {
|
class CleanupTestDatabasesTask extends BuildTask {
|
||||||
protected $title = 'Deletes all temporary test databases';
|
protected $title = 'Deletes all temporary test databases';
|
||||||
|
|
||||||
protected $description = 'Cleans up leftover databases from aborted test executions (starting with ss_tmpdb)';
|
protected $description = 'Cleans up leftover databases from aborted test executions (starting with ss_tmpdb)';
|
||||||
|
|
||||||
public function init() {
|
public function run($request) {
|
||||||
parent::init();
|
|
||||||
|
|
||||||
if(!Permission::check('ADMIN') && !Director::is_cli()) {
|
if(!Permission::check('ADMIN') && !Director::is_cli()) {
|
||||||
return Security::permissionFailure($this);
|
$response = Security::permissionFailure($this);
|
||||||
|
if($response) {
|
||||||
|
$response->output();
|
||||||
|
}
|
||||||
|
die;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function run() {
|
|
||||||
SapphireTest::delete_all_temp_dbs();
|
SapphireTest::delete_all_temp_dbs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user