[TASK] Run postgres tests on non-default port in v8 core 82/56882/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 7 May 2018 16:20:08 +0000 (18:20 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 7 May 2018 16:58:24 +0000 (18:58 +0200)
The bamboo testing images have been updated to ubuntu 18.04 base
which comes with postgres 10 by default. This however breaks
core v8 postgres acceptance and functional tests since doctrine-dbal
version of v8 core does not support postgres 10. This will not be
fixed in the php 7.0 compatible doctrine-dbal versions.
The test images thus now come with a second, version 9.5 based postgres
on "default port +1" (5433). The patch on v8 does:
* Adapt bamboo test plan to use 5433 port for postgres tests
* Raise typo3/testing-framework to 1.2.5 which contains postgres
  db preparations on non-standard port
* Adapt postgres acceptance installer test to fill in port if given
* Cope with a slightly different git output in bamboo plan

Resolves: #84941
Releases: 8.7
Change-Id: Ib52897d753cad43598e7271a0971ba361b9bc0f1
Reviewed-on: https://review.typo3.org/56882
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Build/bamboo/src/main/java/core/AbstractCoreSpec.java
composer.lock
typo3/sysext/core/Tests/AcceptanceInstallMysql/InstallWithMysqlIntroductionPackageCest.php
typo3/sysext/core/Tests/AcceptanceInstallPgsql/InstallWithPgsqlBlankPageCest.php
typo3/sysext/core/Tests/AcceptanceInstallPgsql/InstallWithPgsqlIntroductionPackageCest.php

index 0eca083..76814fe 100644 (file)
@@ -71,6 +71,7 @@ abstract public class AbstractCoreSpec {
         " typo3DatabaseName=\"func\"" +
         " typo3DatabaseUsername=\"bamboo\"" +
         " typo3DatabaseHost=\"localhost\"" +
+        " typo3DatabasePort=\"5433\"" +
         " typo3InstallToolPassword=\"klaus\"";
 
     /**
@@ -603,7 +604,7 @@ abstract public class AbstractCoreSpec {
                     .interpreter(ScriptTaskProperties.Interpreter.BINSH_OR_CMDEXE)
                     .inlineBody(
                         this.getScriptTaskBashInlineBody() +
-                        "git status | grep -q \"nothing to commit, working directory clean\""
+                        "git status | grep -q \"nothing to commit, working tree clean\""
                     )
             )
             .requirements(
@@ -798,12 +799,12 @@ abstract public class AbstractCoreSpec {
                 this.getScriptTaskBashInlineBody() +
                 "DB_STARTS_WITH=\"func_\"\n" +
                 "PGUSER=\"bamboo\"\n" +
-                "DBS=\"$(/usr/bin/psql -qtA -c 'SELECT datname FROM pg_database WHERE datistemplate = false;' postgres)\"\n" +
+                "DBS=\"$(/usr/bin/psql -qtA -p 5433 -c 'SELECT datname FROM pg_database WHERE datistemplate = false;' postgres)\"\n" +
                 "\n" +
                 "for db in $DBS; do\n" +
                 "    if [[ \"$db\" == $DB_STARTS_WITH* ]]; then\n" +
                 "        echo \"Deleting $db\"\n" +
-                "        /usr/bin/psql -qtA -c \"DROP DATABASE $db\" postgres\n" +
+                "        /usr/bin/psql -qtA -p 5433 -c \"DROP DATABASE $db\" postgres\n" +
                 "    fi\n" +
                 "done\n"
             );
index b4a6db7..cb5c16e 100644 (file)
@@ -1,7 +1,7 @@
 {
     "_readme": [
         "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
     "content-hash": "7a8192024da87bd27d79d2ff271bee38",
         },
         {
             "name": "typo3/testing-framework",
-            "version": "1.2.4",
+            "version": "1.2.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/TYPO3/testing-framework.git",
-                "reference": "e1e456ae30137cb7b74134a5f9b7c58ad2244fd9"
+                "reference": "4432bd9e4e39fb980481b35c5d4ec0054c427d28"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/e1e456ae30137cb7b74134a5f9b7c58ad2244fd9",
-                "reference": "e1e456ae30137cb7b74134a5f9b7c58ad2244fd9",
+                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/4432bd9e4e39fb980481b35c5d4ec0054c427d28",
+                "reference": "4432bd9e4e39fb980481b35c5d4ec0054c427d28",
                 "shasum": ""
             },
             "require": {
                 "tests",
                 "typo3"
             ],
-            "time": "2018-02-17T20:16:27+00:00"
+            "time": "2018-05-07T09:47:32+00:00"
         },
         {
             "name": "webmozart/assert",
index 26953c5..61140da 100644 (file)
@@ -69,7 +69,7 @@ class InstallWithMysqlIntroductionPackageCest
         $I->switchToIFrame('list_frame');
         $I->waitForText('Get preconfigured distribution', 30);
         $I->click('.t3-button-action-installdistribution');
-        $I->waitForText('You successfully installed the distribution:introduction', 30);
+        $I->waitForText('You successfully installed the distribution:introduction', 120);
 
         // Verify default frontend is rendered
         $I->amOnPage('/');
index 1b04ecb..66ba18c 100644 (file)
@@ -38,6 +38,10 @@ class InstallWithPgsqlBlankPageCest
         $I->fillField('#t3-install-step-postgresManualConfiguration-username', getenv('typo3DatabaseUsername'));
         // password intentionally not filled. Postgres authenticates with the shell user.
         $I->fillField('#t3-install-step-postgresManualConfiguration-database', getenv('typo3DatabaseName') . '_atipgsql');
+        // fill port if set in environment
+        if (!empty(getenv('typo3DatabasePort'))) {
+            $I->fillField('#t3-install-step-postgresManualConfiguration-port', getenv('typo3DatabasePort'));
+        }
         $I->click('Continue');
 
         // DatabaseData step
index f7fb250..988ab46 100644 (file)
@@ -38,6 +38,10 @@ class InstallWithPgsqlIntroductionPackageCest
         $I->fillField('#t3-install-step-postgresManualConfiguration-username', getenv('typo3DatabaseUsername'));
         // password intentionally not filled. Postgres authenticates with the shell user.
         $I->fillField('#t3-install-step-postgresManualConfiguration-database', getenv('typo3DatabaseName') . '_atipgsql');
+        // fill port if set in environment
+        if (!empty(getenv('typo3DatabasePort'))) {
+            $I->fillField('#t3-install-step-postgresManualConfiguration-port', getenv('typo3DatabasePort'));
+        }
         $I->click('Continue');
 
         // DatabaseData step
@@ -65,7 +69,7 @@ class InstallWithPgsqlIntroductionPackageCest
         $I->switchToIFrame('list_frame');
         $I->waitForText('Get preconfigured distribution', 30);
         $I->click('.t3-button-action-installdistribution');
-        $I->waitForText('You successfully installed the distribution:introduction', 30);
+        $I->waitForText('You successfully installed the distribution:introduction', 120);
 
         // Verify default frontend is rendered
         $I->amOnPage('/');