mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Make install command better support PostgreSQL
This commit is contained in:
parent
96cb024cf5
commit
49df7d8c52
2 changed files with 22 additions and 19 deletions
|
@ -36,18 +36,6 @@ class InstallCommandTest extends WallabagTestCase
|
|||
|
||||
/** @var Connection $connection */
|
||||
$connection = $this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection();
|
||||
if ($connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
/*
|
||||
* LOG: statement: CREATE DATABASE "wallabag"
|
||||
* ERROR: source database "template1" is being accessed by other users
|
||||
* DETAIL: There is 1 other session using the database.
|
||||
* STATEMENT: CREATE DATABASE "wallabag"
|
||||
* FATAL: database "wallabag" does not exist
|
||||
*
|
||||
* http://stackoverflow.com/a/14374832/569101
|
||||
*/
|
||||
$this->markTestSkipped('PostgreSQL spotted: can\'t find a good way to drop current database, skipping.');
|
||||
}
|
||||
|
||||
if ($connection->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
// Environnement variable useful only for sqlite to avoid the error "attempt to write a readonly database"
|
||||
|
@ -142,6 +130,10 @@ class InstallCommandTest extends WallabagTestCase
|
|||
|
||||
public function testRunInstallCommandWithDatabaseRemoved()
|
||||
{
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
$this->markTestSkipped('PostgreSQL spotted: can\'t find a good way to drop current database, skipping.');
|
||||
}
|
||||
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('Rollback are not properly handled for MySQL, skipping.');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue