-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: Framework/CodeFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
When even a single integration test is executed, the following files and directories are created:
app/code/Magento
├── TestModuleDirectoryZipCodes
│ ├── etc
│ │ ├── module.xml
│ │ └── zip_codes.xml
│ └── registration.php
├── TestModuleFakePaymentMethod
│ ├── Gateway
│ │ └── Command
│ │ └── DoNothingCommand.php
│ ├── etc
│ │ ├── config.xml
│ │ ├── di.xml
│ │ └── module.xml
│ └── registration.php
└── TestModuleSample
├── composer.json
├── etc
│ └── module.xml
└── registration.php
(Note: the module Magento_TestModuleFakePaymentMethod
is not generated in Magento 2.2.0).
This is a problem because running integration tests should not affect the installed Magento instance.
Preconditions
Reproduced on fresh installations of Magento 2.2.0 and 2.2.2. I haven't tried on Magento 2.2.1.
Steps to reproduce
- Install Magento, e.g.
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .
and so on. - Run all integration tests or create a custom module with nothing but a single integration test.
- Run the test, e.g.
/var/www/example/vendor/phpunit/phpunit/phpunit --configuration /var/www/example/dev/tests/integration/phpunit.xml /var/www/example/app/code/Example/Foo/Test/Integration
Expected result
- Only the specified tests should run in isolation.
- Potential production code should not be affected.
Actual result
The modules are created in app/code/Magento potentially affect production code and are created independently if they are used in any test.
It should be possible to create the modules under dev/tests/integration/tmp in the sandbox directory and register them in the test process with the component registrar instead, leaving the app/code directory unmodified.
jalogut, schmengler, bartoszkubicki, sprankhub and alexkops
Metadata
Metadata
Assignees
Labels
Component: Framework/CodeFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release