Skip to content

Commit

Permalink
⏫ Forwardport of #11499 to 2.3-develop branch
Browse files Browse the repository at this point in the history
Applied pull request patch https://github.com/magento/magento2/pull/11499.patch (created by @joshuaswarren) based on commit(s):
  1. bd95e4e

Fixed GitHub Issues in 2.3-develop branch:
  - #10025: Integration tests don't reset the database (reported by @dersam)
  • Loading branch information
magento-engcom-team committed Jan 23, 2018
1 parent 8e77e2f commit 56f7708
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public function cleanup()
* @return void
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function install()
public function install($cleanup)
{
$dirs = \Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS;
$this->_ensureDirExists($this->installDir);
Expand All @@ -459,8 +459,9 @@ public function install()
$installParams = $this->getInstallCliParams();

// performance optimization: restore DB from last good dump to make installation on top of it (much faster)
// do not restore from the database if the cleanup option is set to ensure we have a clean DB to test on
$db = $this->getDbInstance();
if ($db->isDbDumpExists()) {
if ($db->isDbDumpExists() && !$cleanup) {
$db->restoreFromDbDump();
}

Expand Down
2 changes: 1 addition & 1 deletion dev/tests/integration/framework/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
$application->cleanup();
}
if (!$application->isInstalled()) {
$application->install();
$application->install($settings->getAsBoolean('TESTS_CLEANUP'));
}
$application->initialize([]);

Expand Down

0 comments on commit 56f7708

Please sign in to comment.