Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test in freshly generated package fail "PDOException: could not find driver" #24

Open
spekulatius opened this issue Sep 27, 2020 · 0 comments

Comments

@spekulatius
Copy link
Contributor

Hey @sarthaksavvy

in a freshly generated package without any changes the tests fail (for me).

Steps:

  1. packer new and fill in the requested values
  2. composer install
  3. composer test

I guess this is unexpected.

Cheers,
Peter

23:35 $ composer test
> vendor/bin/phpunit
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.24-0ubuntu0.18.04.6
Configuration: /tmp/test/Pack/phpunit.xml

EE                                                                  2 / 2 (100%)

Time: 123 ms, Memory: 16.00 MB

There were 2 errors:

1) Peter\Pack\Tests\Feature\ExampleTest::testBasicTest
Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

Caused by
PDOException: could not find driver

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:25
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:218
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:919
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:399
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:325
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

2) Peter\Pack\Tests\Unit\ExampleTest::testBasicTest
Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

Caused by
PDOException: could not find driver

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:25
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:218
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:919
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:399
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:325
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

ERRORS!
Tests: 2, Assertions: 0, Errors: 2.
Script vendor/bin/phpunit handling the test event returned with error code 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant