mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MNT Skip test in MySQL8
This commit is contained in:
parent
674e6d9b7b
commit
5eb8d3e25f
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -14,5 +14,3 @@ jobs:
|
||||
with:
|
||||
# Turn phpcoverage off because it causes a segfault
|
||||
phpcoverage_force_off: true
|
||||
# There is a strange behat.yml file in framework that runs behat tests in the admin module
|
||||
endtoend: false
|
||||
|
34
behat.yml
34
behat.yml
@ -1,34 +0,0 @@
|
||||
# Run framework behat tests with this command (installed with silverstripe/installer)
|
||||
# Note that framework behat tests require CMS module
|
||||
# ========================================================================= #
|
||||
# vendor/bin/selenium-server-standalone -Dwebdriver.firefox.bin="/Applications/Firefox31.app/Contents/MacOS/firefox-bin"
|
||||
# vendor/bin/serve --bootstrap-file vendor/silverstripe/framework/tests/behat/serve-bootstrap.php
|
||||
# vendor/bin/behat @framework
|
||||
# ========================================================================= #
|
||||
default:
|
||||
suites:
|
||||
framework:
|
||||
paths:
|
||||
- "%paths.modules.admin%/tests/behat/features"
|
||||
contexts:
|
||||
- SilverStripe\Framework\Tests\Behaviour\FeatureContext
|
||||
- SilverStripe\Framework\Tests\Behaviour\CmsFormsContext
|
||||
- SilverStripe\Framework\Tests\Behaviour\CmsUiContext
|
||||
- SilverStripe\BehatExtension\Context\BasicContext
|
||||
- SilverStripe\BehatExtension\Context\EmailContext
|
||||
- SilverStripe\BehatExtension\Context\LoginContext
|
||||
-
|
||||
SilverStripe\BehatExtension\Context\FixtureContext:
|
||||
- "%paths.modules.admin%/tests/behat/features/files/"
|
||||
|
||||
extensions:
|
||||
SilverStripe\BehatExtension\MinkExtension:
|
||||
default_session: facebook_web_driver
|
||||
javascript_session: facebook_web_driver
|
||||
facebook_web_driver:
|
||||
browser: chrome
|
||||
wd_host: "http://127.0.0.1:9515" #chromedriver port
|
||||
|
||||
SilverStripe\BehatExtension\Extension:
|
||||
screenshot_path: "%paths.base%/artifacts/screenshots"
|
||||
bootstrap_file: "tests/behat/serve-bootstrap.php"
|
@ -8,6 +8,7 @@ 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;
|
||||
@ -67,11 +68,26 @@ 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();
|
||||
@ -126,6 +142,10 @@ 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();
|
||||
|
Loading…
Reference in New Issue
Block a user