Skip to content
Snippets Groups Projects
Verified Commit 7f06eb5e authored by Dave Long's avatar Dave Long
Browse files

Issue #3385620 by fjgarlin, andypost: [GitlabCI] SQLite currently not working

(cherry picked from commit d0cfc6d0)
parent 94e8a471
No related branches found
No related tags found
13 merge requests!7564Revert "Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06,...,!5752Issue #3275828 by joachim, quietone, bradjones1, Berdir: document the reason...,!5627Issue #3261805: Field not saved when change of 0 on string start,!5427Issue #3338518: send credentials in ajax if configured in CORS settings.,!5395Issue #3387916 by fjgarlin, Spokje: Each GitLab job exposes user email,!5217Issue #3386607 by alexpott: Improve spell checking in commit-code-check.sh,!5064Issue #3379522 by finnsky, Gauravvvv, kostyashupenko, smustgrave, Chi: Revert...,!5040SDC ComponentElement: Transform slots scalar values to #plain_text instead of throwing an exception,!4958Issue #3392147: Whitelist IP for a Ban module.,!4894Issue #3280279: Add API to allow sites to opt in to upload SVG images in CKEditor 5,!3106Issue #3017548: "Filtered HTML" text format does not support manual teaser break (<!--break-->),!925Issue #2339235: Remove taxonomy hard dependency on node module,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links
Pipeline #25171 passed
+1
......@@ -66,7 +66,7 @@ stages:
allow_failure: false
variables:
_TARGET_PHP: "8.2"
_TARGET_DB: "mysql-8"
_TARGET_DB: "sqlite-3"
image:
name: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:production
rules:
......@@ -180,11 +180,11 @@ stages:
_TARGET_PHP: "8.2"
_TARGET_DB: "pgsql-16"
# 'PHP 8.2 SQLite 3.34.0':
# <<: [ *default-stage, *run-on-commit ]
# variables:
# _TARGET_PHP: "8.2"
# _TARGET_DB: "php-$_TARGET_PHP-apache"
'PHP 8.2 SQLite 3':
<<: [ *default-stage, *run-on-commit ]
variables:
_TARGET_PHP: "8.2"
_TARGET_DB: "sqlite-3"
# Run daily, or manually.
# 'PHP 8.1 MariaDB 10.3.22':
......@@ -205,11 +205,11 @@ stages:
_TARGET_PHP: "8.1"
_TARGET_DB: "pgsql-14.1"
# 'PHP 8.1 SQLite 3.27.0':
# <<: [ *default-stage, *run-daily ]
# variables:
# _TARGET_PHP: "8.1"
# _TARGET_DB: "php-$_TARGET_PHP-apache"
'PHP 8.1 SQLite 3':
<<: [ *default-stage, *run-daily ]
variables:
_TARGET_PHP: "8.1"
_TARGET_DB: "sqlite-3"
################
......
......@@ -123,7 +123,7 @@ stages:
script:
# Determine DB driver.
- |
[[ $_TARGET_DB == php* ]] && export SIMPLETEST_DB=sqlite://localhost/subdirectory/sites/default/files/db.sqlite?module=sqlite
[[ $_TARGET_DB == sqlite* ]] && export SIMPLETEST_DB=sqlite://localhost/$CI_PROJECT_DIR/sites/default/files/db.sqlite?module=sqlite
[[ $_TARGET_DB == mysql* ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == mariadb* ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == pgsql* ]] && export SIMPLETEST_DB=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB?module=pgsql
......@@ -131,7 +131,7 @@ stages:
- chown -R www-data:www-data ./sites ./build/logs/junit ./vendor /var/www/
- sudo -u www-data git config --global --add safe.directory $CI_PROJECT_DIR
# Need to pass this along directly.
- sudo MINK_DRIVER_ARGS_WEBDRIVER="$MINK_DRIVER_ARGS_WEBDRIVER" -u www-data php ./core/scripts/run-tests.sh --color --keep-results --types "$TESTSUITE" --concurrency "$CONCURRENCY" --repeat "1" --sqlite "./sites/default/files/.sqlite" --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --verbose --non-html --all --ci-parallel-node-index $CI_PARALLEL_NODE_INDEX --ci-parallel-node-total $CI_PARALLEL_NODE_TOTAL
- sudo MINK_DRIVER_ARGS_WEBDRIVER="$MINK_DRIVER_ARGS_WEBDRIVER" -u www-data php ./core/scripts/run-tests.sh --color --keep-results --types "$TESTSUITE" --concurrency "$CONCURRENCY" --repeat "1" --sqlite "./sites/default/files/tests.sqlite" --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --verbose --non-html --all --ci-parallel-node-index $CI_PARALLEL_NODE_INDEX --ci-parallel-node-total $CI_PARALLEL_NODE_TOTAL
################
# Jobs
......@@ -292,7 +292,7 @@ stages:
script:
# Determine DB driver.
- |
[[ $_TARGET_DB == php* ]] && export DRUPAL_TEST_DB_URL=sqlite://localhost/subdirectory/sites/default/files/db.sqlite?module=sqlite
[[ $_TARGET_DB == sqlite* ]] && export DRUPAL_TEST_DB_URL=sqlite://localhost/$CI_PROJECT_DIR/sites/default/files/db.sqlite?module=sqlite
[[ $_TARGET_DB == mysql* ]] && export DRUPAL_TEST_DB_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == mariadb* ]] && export DRUPAL_TEST_DB_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == pgsql* ]] && export DRUPAL_TEST_DB_URL=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB?module=pgsql
......
......@@ -47,6 +47,10 @@ protected function setUp(): void {
* - The checkRequirements() method throws a RequirementsException.
*/
public function testMissingDatabase(): void {
if (Database::getConnection()->driver() === 'sqlite') {
$this->markTestSkipped('Not compatible with sqlite');
}
$migration = $this->migrationPluginManager->createInstance('missing_database');
$this->assertInstanceOf(MigrationInterface::class, $migration);
$this->assertInstanceOf(MigrateIdMapInterface::class, $migration->getIdMap());
......
......@@ -132,6 +132,10 @@ public function testConnectionTypes() {
* Tests the exception when a connection is defined but not available.
*/
public function testBrokenConnection(): void {
if (Database::getConnection()->driver() === 'sqlite') {
$this->markTestSkipped('Not compatible with sqlite');
}
$sql_base = new TestSqlBase([], $this->migration);
$target = 'test_state_db_target2';
$key = 'test_state_migrate_connection2';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment