-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Progress: ready for groomingReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itfeature request
Description
Summary
This request is mainly about overriding the TESTS_CLEANUP constant value in integration tests. Currently this value can be changed in the phpunit.xml. But this is very static and cannot be overridden easily.
My use case:
In my local dev environment I usually want to run the integration tests without the cleanup, because it takes too long. But when there are new migration scripts or modules, I want the cleanup to be executed.
Currently this requires me to edit the phpunit.xml, which is quite annoying.
Therefore I suggest to make the integration test settings overridable per env variables.
Then I can run TESTS_CLEANUP=disable vendor/bin/phpunit -c dev/tests/integration/phpunit.xml
Examples
The patch would simply be
diff --git a/dev/tests/integration/framework/bootstrap.php b/dev/tests/integration/framework/bootstrap.php
index 09f599217ca..749f3394c1b 100644
--- a/dev/tests/integration/framework/bootstrap.php
+++ b/dev/tests/integration/framework/bootstrap.php
@@ -30,7 +30,10 @@ try {
setCustomErrorHandler();
/* Bootstrap the application */
- $settings = new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, get_defined_constants());
+ $settings = new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, array_replace(
+ get_defined_constants(),
+ getenv()
+ ));
$testFrameworkDir = __DIR__;
require_once 'deployTestModules.php';Proposed solution
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Progress: ready for groomingReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itfeature request
Type
Projects
Status
Ready for Grooming