Merge pull request #10422 from creative-commoners/pulls/4.11/revert-skiptest

MNT No longer mark tests as skipped if running mysql 8
This commit is contained in:
Guy Sartorelli 2022-07-26 15:58:11 +12:00 committed by GitHub
commit 0a58a443f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 21 deletions

View File

@ -3,12 +3,10 @@
namespace SilverStripe\ORM\Tests;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\Connect\MySQLSchemaManager;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBEnum;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\ORM\Connect\MySQLiConnector;
use SilverStripe\ORM\Tests\DataObjectSchemaGenerationTest\SortedObject;
use SilverStripe\ORM\Tests\DataObjectSchemaGenerationTest\TestIndexObject;
use SilverStripe\ORM\Tests\DataObjectSchemaGenerationTest\TestObject;
@ -68,26 +66,11 @@ class DataObjectSchemaGenerationTest extends SapphireTest
);
}
private function isMySQL8(): bool
{
$connector = DB::get_conn()->getConnector();
if ($connector instanceof MySQLiConnector &&
preg_match('#^8\.#', $connector->getVersion())
) {
return true;
}
return false;
}
/**
* Check that once a schema has been generated, then it doesn't need any more updating
*/
public function testFieldsDontRerequestChanges()
{
// TODO: remove the MySQL8 skip when `int(11)` is no longer the default field type for integers and has been replaced with `int`
if ($this->isMySQL8()) {
$this->markTestSkipped();
}
$schema = DB::get_schema();
$test = $this;
DB::quiet();
@ -142,10 +125,6 @@ class DataObjectSchemaGenerationTest extends SapphireTest
*/
public function testIndexesDontRerequestChanges()
{
// TODO: remove the MySQL8 skip when `int(11)` is no longer the default field type for integers and has been replaced with `int`
if ($this->isMySQL8()) {
$this->markTestSkipped();
}
$schema = DB::get_schema();
$test = $this;
DB::quiet();