paliarush / magento2-vagrant-for-developers

Vagrant Box for Magento 2 Developers
MIT License
447 stars 165 forks source link

Added configure_tests script support for Magento EE, removed Rabbit M from integration test config on Magento CE. #205

Open orlandothoeny opened 6 years ago

orlandothoeny commented 6 years ago

The following error occurred to me when I wanted to run integration tests with bash m-bin-magento dev:tests:run integration: Symfony\Component\Console\Excepton\RuntimeException: The "--amqp-host" option does not exist. Error message --amqp* should not be added to setup:install on the integration tests, if using Magento CE.

My integration/etc/install-config-mysql.php file looked like this:

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

return [
    'db-host' => 'localhost',
    'db-user' => 'root',
    'db-password' => '',
    'db-name' => 'magento_integration_tests',
    'db-prefix' => '',
    'backend-frontname' => 'backend',
    'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
    'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
    'admin-email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
    'admin-firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,
    'admin-lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME,

    'amqp-host' => 'localhost',
    'amqp-post' => '5672',
    'amqp-user' => 'guest',
    'amqp-password' => 'guest',
];

After removing the amqp array keys, the integration tests worked:

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

return [
    'db-host' => 'localhost',
    'db-user' => 'root',
    'db-password' => '',
    'db-name' => 'magento_integration_tests',
    'db-prefix' => '',
    'backend-frontname' => 'backend',
    'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
    'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
    'admin-email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
    'admin-firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,
    'admin-lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME,
];

I didn't test if this works on Magento EE, would appreciate it if someone could test it.