diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b98a718d8..55ebdf77d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Support for new location of `generated` directory in Magento 2.2.0 + - Basic data generation can be turned off. Added configurable product and customer address generation ### Fixed diff --git a/README.md b/README.md index a9497c932d6..89efd01a38d 100755 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ * [Clear Magento cache](#clear-magento-cache) * [Switch between CE and EE](#switch-between-ce-and-ee) * [Sample data installation](#sample-data-installation) + * [Basic data generation](#basic-data-generation) * [Use Magento CLI (bin/magento)](#use-magento-cli-binmagento) * [Debugging with XDebug](#debugging-with-xdebug) * [Connecting to MySQL DB](#connecting-to-mysql-db) @@ -186,6 +187,16 @@ During initial project setup or during `bash init_project.sh -fc` (with `-fc` pr To install Magento with sample data set `install_sample_data` in [config.yaml](etc/config.yaml.dist) to `1` and run `bash m-switch-to-ce -f` or `bash m-switch-to-ee -f`, depending on the edition to be installed. To disable sample data, set this option to `0` and force-switch to necessary edition (using the same commands). +### Basic data generation + +Several entities are generated for testing purposes by default using REST API after Magento installation: +- Customer with address (credentials `customer@example.com`:`123123qQ`) +- Category +- Couple simple products +- Configurable product + +To disable this feature, set `magento/generate_basic_data` in [config.yaml](etc/config.yaml.dist) to `0` and run `bash m-switch-to-ce -f` or `bash m-switch-to-ee -f`, depending on the edition to be installed. + ### Use Magento CLI (bin/magento) Go to 'vagrant-magento' created earlier and run in command line: diff --git a/etc/config.yaml.dist b/etc/config.yaml.dist index 1ca8c3df8cb..92e3b8a4bc5 100644 --- a/etc/config.yaml.dist +++ b/etc/config.yaml.dist @@ -46,6 +46,8 @@ environment: magento: # [To apply changes: m-switch-to-ce -f OR m-switch-to-ee -f] install_sample_data: 0 + # [To apply changes: m-switch-to-ce -f OR m-switch-to-ee -f] Generate customer (customer@example.com:123123qQ), category, simple product, configurable product after successful Magento installation + generate_basic_data: 1 # [To apply changes: init_project.sh -f] host_name: "magento2.vagrant2" # [To apply changes: m-reinstall] diff --git a/scripts/guest/generate_sample_data b/scripts/guest/generate_basic_data similarity index 100% rename from scripts/guest/generate_sample_data rename to scripts/guest/generate_basic_data diff --git a/scripts/guest/m-reinstall b/scripts/guest/m-reinstall index d15f5e5d321..f0d344cff7d 100755 --- a/scripts/guest/m-reinstall +++ b/scripts/guest/m-reinstall @@ -8,7 +8,7 @@ get_config_value="/vagrant/scripts/get_config_value.sh" magento_host_name="$(bash ${get_config_value} "magento_host_name")" use_nfs="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs")" is_windows_host=${IS_WINDOWS_HOST} -generate_data="$(bash ${get_config_value} "magento_generate_sample_data")" +generate_basic_data="$(bash ${get_config_value} "magento_generate_basic_data")" declare -A setupOptions setupOptions[admin_frontname]="$(bash ${get_config_value} "magento_admin_frontname")" @@ -106,8 +106,8 @@ if [[ ${is_windows_host} == 1 ]] || [[ ${use_nfs} == 0 ]]; then sudo chown -R vagrant:vagrant ${MAGENTO_ROOT} fi -if [[ ${generate_data} == 1 ]]; then - bash generate_sample_data +if [[ ${generate_basic_data} != 0 ]]; then + bash generate_basic_data fi bash configure_search_engine bash change_magento_config_for_functional_tests