Skip to content

Commit d67d7d1

Browse files
committed
don't create local sqlite db in CI
1 parent 3bb106c commit d67d7d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/helpers/DatabaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public function setUp(string $connection_name=null): void
3131

3232
$this->original_date_class = $config->get_date_class();
3333

34-
if ('sqlite' == $connection_name || 'sqlite' == $config->get_default_connection()) {
35-
// need to create the db. the adapter specifically does not create it for us.
34+
if (empty($envDatabase) && 'sqlite' == $connection_name || 'sqlite' == $config->get_default_connection()) {
35+
// need to create the db (when not running in CI). the adapter specifically does not create it for us.
3636
static::$db = substr(ActiveRecord\Config::instance()->get_connection('sqlite'), 9);
3737
new SQLite3(static::$db);
3838
}

0 commit comments

Comments
 (0)