[BUGFIX] Side effects from LocalConfiguration in acceptance tests 19/50219/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 13 Oct 2016 16:36:51 +0000 (18:36 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 13 Oct 2016 17:18:10 +0000 (19:18 +0200)
The functional tests and acceptance test setup is designed to fetch
database settings from a LocalConfiguration if they are not hand
over as environment variables.
The patch restricts the array to use only sub parts from 'DB' of
LocalConfiguration and not more since otherwise funny side effects
are introduced.
This issue was introduced in master (not 7.6) when the test
bootstrap was refactored and prepared for the acceptance tests.

Change-Id: I4c7721ec52747a5d4e1163fb74a1eb38f4e2be94
Resolves: #78288
Releases: master
Reviewed-on: https://review.typo3.org/50219
Reviewed-by: Michael Knabe <typo3-2015@mfkhh.de>
Tested-by: Michael Knabe <typo3-2015@mfkhh.de>
Reviewed-by: Kemal Emre <k.emre@reply.de>
Tested-by: Kemal Emre <k.emre@reply.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Tests/FunctionalTestCase.php
typo3/sysext/core/Classes/Tests/Testbase.php
typo3/sysext/core/Tests/AcceptanceCoreEnvironment.php

index d5f5d16..b3d5d32 100644 (file)
@@ -223,7 +223,7 @@ abstract class FunctionalTestCase extends BaseTestCase
             $testbase->setUpInstanceCoreLinks($this->instancePath);
             $testbase->linkTestExtensionsToInstance($this->instancePath, $this->testExtensionsToLoad);
             $testbase->linkPathsInTestInstance($this->instancePath, $this->pathsToLinkInTestInstance);
-            $localConfiguration = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
+            $localConfiguration['DB'] = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
             $originalDatabaseName = $localConfiguration['DB']['Connections']['Default']['dbname'];
             // Append the unique identifier to the base database name to end up with a single database per test case
             $localConfiguration['DB']['Connections']['Default']['dbname'] = $originalDatabaseName . '_ft' . $this->identifier;
index 129f315..f351bc1 100644 (file)
@@ -355,7 +355,7 @@ class Testbase
                 1397406356
             );
         }
-        return $originalConfigurationArray;
+        return $originalConfigurationArray['DB'];
     }
 
     /**
index 826756e..85714a0 100644 (file)
@@ -187,7 +187,7 @@ class AcceptanceCoreEnvironment extends Extension
         );
         $testbase->linkTestExtensionsToInstance($instancePath, $testExtensionsToLoad);
         $testbase->linkPathsInTestInstance($instancePath, $this->pathsToLinkInTestInstance);
-        $localConfiguration = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
+        $localConfiguration['DB'] = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
         $originalDatabaseName = $localConfiguration['DB']['Connections']['Default']['dbname'];
         // Append the unique identifier to the base database name to end up with a single database per test case
         $localConfiguration['DB']['Connections']['Default']['dbname'] = $originalDatabaseName . '_at';
@@ -197,6 +197,7 @@ class AcceptanceCoreEnvironment extends Extension
         $localConfiguration['BE']['debug'] = true;
         $localConfiguration['BE']['lockHashKeyWords'] = '';
         $localConfiguration['BE']['installToolPassword'] = '$P$notnotnotnotnotnot.validvalidva';
+        $localConfiguration['BE']['loginSecurityLevel'] = 'rsa';
         $localConfiguration['SYS']['isInitialInstallationInProgress'] = false;
         $localConfiguration['SYS']['isInitialDatabaseImportDone'] = true;
         $localConfiguration['SYS']['displayErrors'] = false;