File tree 2 files changed +4
-3
lines changed
dev/tests/integration/framework
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ public function cleanup()
438
438
* @return void
439
439
* @throws \Magento\Framework\Exception\LocalizedException
440
440
*/
441
- public function install ()
441
+ public function install ($ cleanup )
442
442
{
443
443
$ dirs = \Magento \Framework \App \Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS ;
444
444
$ this ->_ensureDirExists ($ this ->installDir );
@@ -453,8 +453,9 @@ public function install()
453
453
$ installParams = $ this ->getInstallCliParams ();
454
454
455
455
// 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
456
457
$ db = $ this ->getDbInstance ();
457
- if ($ db ->isDbDumpExists ()) {
458
+ if ($ db ->isDbDumpExists () && ! $ cleanup ) {
458
459
$ db ->restoreFromDbDump ();
459
460
}
460
461
Original file line number Diff line number Diff line change 74
74
$ application ->cleanup ();
75
75
}
76
76
if (!$ application ->isInstalled ()) {
77
- $ application ->install ();
77
+ $ application ->install ($ settings -> getAsBoolean ( ' TESTS_CLEANUP ' ) );
78
78
}
79
79
$ application ->initialize ([]);
80
80
You can’t perform that action at this time.
0 commit comments