Skip to content

Commit b8c16a9

Browse files
rellivclaude
andcommitted
Use SQLite in-memory database for tests
Switch from MySQL to SQLite for CI compatibility. The CI workflow doesn't have a MySQL service, causing connection refused errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 749d6c7 commit b8c16a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/TestCase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ protected function defineDatabaseSeeders()
7575

7676
public function getEnvironmentSetUp($app)
7777
{
78-
config()->set('database.connections.mysql.prefix', 'hasin_test_');
78+
config()->set('database.default', 'testing');
79+
config()->set('database.connections.testing', [
80+
'driver' => 'sqlite',
81+
'database' => ':memory:',
82+
'prefix' => '',
83+
]);
7984

8085
Schema::defaultStringLength(191);
8186
Factory::guessFactoryNamesUsing(

0 commit comments

Comments
 (0)