Download the PHP package ampersand/magento-docker-test-instance without Composer
On this page you can find all versions of the php package ampersand/magento-docker-test-instance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ampersand/magento-docker-test-instance
More information about ampersand/magento-docker-test-instance
Files in ampersand/magento-docker-test-instance
Package magento-docker-test-instance
Short Description A dev dependency helper to set up a magento instance, to be used for testing modules
License LGPL-3.0-only
Informations about the package magento-docker-test-instance
magento-docker-test-instance
Quickly provision a disposable magento docker instance for testing against.
Features
- Booting a full instance for you to click around and run manual or other automated tests on
- Integration testing a module
- Unit testing a module
- Runs the same locally as in your CI pipeline (the sample module demonstrates travis)
We try to keep these installations as vanilla and untouched as possible. However, there are a few caveats
- This is for test use only, not for production or any deployed environment. This uses https://repo-magento-mirror.fooman.co.nz/ to pull in Magento which should not be used for production.
- 2FA modules are disabled by default to allow easier admin access
Usage
Run ./bin/mtest-make
to see all supported versions
Full Installation
You can install by cloning this repo
or pull it in as a composer dependency
That will allow you to then browse http://0.0.0.0:1234/admin
with the credentials admin/somepassword123
Partial Installation for running unit/integration tests
Please see this sample module for instructions on how to run your custom integration/unit tests.
Configuration
We have the following environment variables which can be overridden when running the ./vendor/bin/mtest-make
command
ENV VAR | Default value/contents | Example |
---|---|---|
COMPOSER_REPOSITORY |
https://repo-magento-mirror.fooman.co.nz/ | COMPOSER_REPOSITORY='https://repo.packagist.com/your_org_here/' vendor/bin/mtest-make 2-4-5 |
UNIT_TESTS_PATH |
src/Test/Unit | UNIT_TESTS_PATH='Tests/Unit' vendor/bin/mtest-make 2-4-5 |
INTEGRATION_TESTS_PATH |
src/Test/Integration | INTEGRATION_TESTS_PATH='Tests/Integration' vendor/bin/mtest-make 2-4-5 |
COMPOSER_MODULE_SYMLINK |
1 | COMPOSER_MODULE_SYMLINK=0 vendor/bin/mtest-make 2-4-5 |
COMPOSER_AUTH_JSON_LOCATION |
./Dockerfile-assets/auth.json contains {} |
COMPOSER_AUTH_JSON_LOCATION=~/.composer/auth.json vendor/bin/mtest-make 2-4-5 |
COMPOSER_REQUIRE_EXTRA |
COMPOSER_REQUIRE_EXTRA='some/suggested-module another/suggested-module' vendor/bin/mtest-make 2-4-5 |
|
COMPOSER_AFTER_INSTALL_COMMAND |
COMPOSER_AFTER_INSTALL_COMMAND='cp foo.txt bar.txt' vendor/bin/mtest-make 2-4-5 |
|
TWOFACTOR_ENABLED |
0 | Whether the magento 2fa modules are enabled by default, can be 1 or 0 |
XDEBUG
You can configure in the docker container /home/ampersand/.phpenv/versions/*/etc/conf.d/xdebug.ini
for your own set up, preconfigured for use at Ampersand.