File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
dev/tests/integration/framework Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ public function cleanup()
438438 * @return void
439439 * @throws \Magento\Framework\Exception\LocalizedException
440440 */
441- public function install ()
441+ public function install ($ cleanup )
442442 {
443443 $ dirs = \Magento \Framework \App \Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS ;
444444 $ this ->_ensureDirExists ($ this ->installDir );
@@ -453,8 +453,9 @@ public function install()
453453 $ installParams = $ this ->getInstallCliParams ();
454454
455455 // performance optimization: restore DB from last good dump to make installation on top of it (much faster)
456+ // do not restore from the database if the cleanup option is set to ensure we have a clean DB to test on
456457 $ db = $ this ->getDbInstance ();
457- if ($ db ->isDbDumpExists ()) {
458+ if ($ db ->isDbDumpExists () && ! $ cleanup ) {
458459 $ db ->restoreFromDbDump ();
459460 }
460461
Original file line number Diff line number Diff line change 7474 $ application ->cleanup ();
7575 }
7676 if (!$ application ->isInstalled ()) {
77- $ application ->install ();
77+ $ application ->install ($ settings -> getAsBoolean ( ' TESTS_CLEANUP ' ) );
7878 }
7979 $ application ->initialize ([]);
8080
You can’t perform that action at this time.
0 commit comments