From bbf3c38391d0622981ba20ce03b90909a367e203 Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Wed, 31 May 2017 22:28:12 +0200
Subject: [PATCH] [TASK] Functionals: Rename "@group mysql" to "@group
 not-postgres"

Functional tests annotated with "@group mysql" are currently ignored
if running tests on postgres via "--exclude-group mysql" argument.
With mssql we have some tests that run fine with mysql and postgres,
but not with mssql.
To improve handling, "@group mysql" annotation is renamed
to "@group not-postgres". Tests not available on postgres and mssql
will then later have a second annotation "@group not-mssql".
This way its easier to keep track which tests go red on which DBMS.

Change-Id: I2522b00352f1a7d61479588a22cdd9ea5d454ca3
Resolves: #81394
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/52984
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../Backend/Typo3DatabaseBackendTest.php      | 16 ++---
 .../Database/Schema/SchemaMigratorTest.php    | 10 ++--
 ...TtContentWithImagesInEmptyDatabaseTest.php |  2 +-
 .../SqlSchemaMigrationServiceTest.php         |  2 +-
 .../Database/DatabaseConnectionTest.php       | 60 +++++++++----------
 .../Database/PreparedStatementTest.php        |  2 +-
 .../Regular/Modify/ActionTest.php             |  2 +-
 7 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php b/typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php
index f98303595255..32f7cbe24480 100644
--- a/typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php
+++ b/typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php
@@ -401,7 +401,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function flushByTagWorksWithEmptyCacheTablesWithMysql()
     {
@@ -412,7 +412,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function flushByTagsWorksWithEmptyCacheTablesWithMysql()
     {
@@ -423,7 +423,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function flushByTagRemovesCorrectRowsFromDatabaseWithMysql()
     {
@@ -443,7 +443,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function flushByTagsRemovesCorrectRowsFromDatabaseWithMysql()
     {
@@ -517,7 +517,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function collectGarbageWorksWithEmptyTableWithMysql()
     {
@@ -528,7 +528,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function collectGarbageRemovesCacheEntryWithExpiredLifetimeWithMysql()
     {
@@ -559,7 +559,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function collectGarbageRemovesTagEntriesForCacheEntriesWithExpiredLifetimeWithMysql()
     {
@@ -590,7 +590,7 @@ class Typo3DatabaseBackendTest extends \TYPO3\TestingFramework\Core\Functional\F
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function collectGarbageRemovesOrphanedTagEntriesFromTagsTableWithMysql()
     {
diff --git a/typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php b/typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php
index cc9591a57ccb..32ff6ebf6381 100644
--- a/typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php
+++ b/typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php
@@ -199,7 +199,7 @@ class SchemaMigratorTest extends \TYPO3\TestingFramework\Core\Functional\Functio
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function renameUnusedField()
     {
@@ -280,7 +280,7 @@ class SchemaMigratorTest extends \TYPO3\TestingFramework\Core\Functional\Functio
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function installPerformsOnlyAddAndCreateOperations()
     {
@@ -308,7 +308,7 @@ class SchemaMigratorTest extends \TYPO3\TestingFramework\Core\Functional\Functio
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function installCanPerformChangeOperations()
     {
@@ -324,7 +324,7 @@ class SchemaMigratorTest extends \TYPO3\TestingFramework\Core\Functional\Functio
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function importStaticDataInsertsRecords()
     {
@@ -350,7 +350,7 @@ class SchemaMigratorTest extends \TYPO3\TestingFramework\Core\Functional\Functio
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function changeTableEngine()
     {
diff --git a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php
index 3058a7783e6d..b05e683a43da 100644
--- a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php
+++ b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php
@@ -170,7 +170,7 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor
 
     /**
      * @test
-     * @group mysql
+     * @group not-postgres
      */
     public function importPagesAndRelatedTtContentWithImageWithForcedUids()
     {
diff --git a/typo3/sysext/install/Tests/Functional/SqlSchemaMigrationServiceTest.php b/typo3/sysext/install/Tests/Functional/SqlSchemaMigrationServiceTest.php
index b859adad45cf..2d1545e22074 100644
--- a/typo3/sysext/install/Tests/Functional/SqlSchemaMigrationServiceTest.php
+++ b/typo3/sysext/install/Tests/Functional/SqlSchemaMigrationServiceTest.php
@@ -36,7 +36,7 @@ class SqlSchemaMigrationServiceTest extends \TYPO3\TestingFramework\Core\Functio
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function columnAndKeyDeletionDoesNotReturnAnError()
     {
diff --git a/typo3/sysext/typo3db_legacy/Tests/Functional/Database/DatabaseConnectionTest.php b/typo3/sysext/typo3db_legacy/Tests/Functional/Database/DatabaseConnectionTest.php
index 4673b67bd6a1..363f02542f79 100644
--- a/typo3/sysext/typo3db_legacy/Tests/Functional/Database/DatabaseConnectionTest.php
+++ b/typo3/sysext/typo3db_legacy/Tests/Functional/Database/DatabaseConnectionTest.php
@@ -75,7 +75,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function selectDbReturnsTrue()
     {
@@ -85,7 +85,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function selectDbReturnsFalse()
     {
@@ -100,7 +100,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlAffectedRowsReturnsCorrectAmountOfRows()
     {
@@ -111,7 +111,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlInsertIdReturnsCorrectId()
     {
@@ -122,7 +122,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function noSqlError()
     {
@@ -133,7 +133,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlErrorWhenInsertIntoInexistentField()
     {
@@ -144,7 +144,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function noSqlErrorCode()
     {
@@ -155,7 +155,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlErrorNoWhenInsertIntoInexistentField()
     {
@@ -166,7 +166,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlPconnectReturnsInstanceOfMySqli()
     {
@@ -176,7 +176,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function connectDbThrowsExeptionsWhenNoDatabaseIsGiven()
     {
@@ -191,7 +191,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function connectDbConnectsToDatabaseWithoutErrors()
     {
@@ -202,7 +202,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function disconnectIfConnectedDisconnects()
     {
@@ -263,7 +263,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
      * @param string $values
      * @param string $expectedResult
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function fullQuoteStrReturnsQuotedString($values, $expectedResult)
     {
@@ -389,7 +389,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
      * @param string $values
      * @param string $expectedResult
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function fullQuoteArrayQuotesArray($values, $expectedResult)
     {
@@ -437,7 +437,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
      * @param string $string String to quote
      * @param string $expectedResult Quoted string we expect
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function quoteStrQuotesDoubleQuotesCorrectly($string, $expectedResult)
     {
@@ -448,7 +448,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminQueryReturnsTrueForInsertQuery()
     {
@@ -460,7 +460,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminQueryReturnsTrueForUpdateQuery()
     {
@@ -476,7 +476,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminQueryReturnsTrueForDeleteQuery()
     {
@@ -490,7 +490,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminQueryReturnsResultForSelectQuery()
     {
@@ -506,7 +506,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminGetCharsetsReturnsArrayWithCharsets()
     {
@@ -523,7 +523,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminGetKeysReturnIndexKeysOfTable()
     {
@@ -534,7 +534,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminGetFieldsReturnFieldInformationsForTable()
     {
@@ -546,7 +546,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminGetTablesReturnAllTablesFromDatabase()
     {
@@ -558,7 +558,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function adminGetDbsReturnsAllDatabases()
     {
@@ -601,7 +601,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
      * @param string $sql
      * @param string $expectedResult
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlNumRowsReturnsCorrectAmountOfRows($sql, $expectedResult)
     {
@@ -619,7 +619,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlNumRowsReturnsFalse()
     {
@@ -658,7 +658,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlFetchAssocReturnsAssocArray()
     {
@@ -717,7 +717,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlFetchRowReturnsNumericArray()
     {
@@ -739,7 +739,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlFreeResultReturnsFalseOnFailure()
     {
@@ -753,7 +753,7 @@ class DatabaseConnectionTest extends \TYPO3\TestingFramework\Core\Functional\Fun
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function sqlFreeResultReturnsTrueOnSuccess()
     {
diff --git a/typo3/sysext/typo3db_legacy/Tests/Functional/Database/PreparedStatementTest.php b/typo3/sysext/typo3db_legacy/Tests/Functional/Database/PreparedStatementTest.php
index 6c7363068323..1c91b7870b47 100644
--- a/typo3/sysext/typo3db_legacy/Tests/Functional/Database/PreparedStatementTest.php
+++ b/typo3/sysext/typo3db_legacy/Tests/Functional/Database/PreparedStatementTest.php
@@ -75,7 +75,7 @@ class PreparedStatementTest extends \TYPO3\TestingFramework\Core\Functional\Func
     /**
      * @test
      *
-     * @group mysql
+     * @group not-postgres
      */
     public function prepareSelectQueryCreateValidQuery()
     {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
index d837a69cb445..b5f4cc1021c9 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
@@ -584,7 +584,7 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
     /**
      * @test
      * @see DataSet/changeContentSortingAndCopyDraftPage.csv
-     * @group mysql
+     * @group not-postgres
      * @todo Analyse PostgreSQL issues further, which is a generic issue
      */
     public function changeContentSortingAndCopyDraftPage()
-- 
GitLab