From 2e370d40150b53f82dfdae2d138f54c30774cb81 Mon Sep 17 00:00:00 2001 From: Nadiya Syvokonenko Date: Wed, 18 Nov 2020 22:56:56 -0600 Subject: [PATCH] MCLOUD-7304: Release ece-tools 2002.1.4 (#18) --- composer.json | 2 +- .../Validator/Deploy/SearchConfiguration.php | 4 ++-- .../Validator/Deploy/SearchConfigurationTest.php | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index aedd0cde83..84cf82b174 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/ece-tools", "description": "Provides tools to build and deploy Magento 2 Enterprise Edition", "type": "magento2-component", - "version": "2002.1.3", + "version": "2002.1.4", "license": "OSL-3.0", "repositories": { "repo.magento.com": { diff --git a/src/Config/Validator/Deploy/SearchConfiguration.php b/src/Config/Validator/Deploy/SearchConfiguration.php index dd6dfd8507..8e774bd943 100644 --- a/src/Config/Validator/Deploy/SearchConfiguration.php +++ b/src/Config/Validator/Deploy/SearchConfiguration.php @@ -10,13 +10,13 @@ use Magento\MagentoCloud\App\Error; use Magento\MagentoCloud\App\GenericException; use Magento\MagentoCloud\Config\ConfigMerger; +use Magento\MagentoCloud\Config\SearchEngine; use Magento\MagentoCloud\Config\Stage\DeployInterface; use Magento\MagentoCloud\Config\Validator; use Magento\MagentoCloud\Config\Validator\ResultFactory; use Magento\MagentoCloud\Config\ValidatorException; use Magento\MagentoCloud\Config\ValidatorInterface; use Magento\MagentoCloud\Package\MagentoVersion; -use Magento\MagentoCloud\Service\ElasticSearch; /** * Validates SEARCH_CONFIGURATION variable @@ -74,7 +74,7 @@ public function validate(): Validator\ResultInterface if ($this->magentoVersion->isGreaterOrEqual('2.4.0') && isset($searchConfig['engine']) - && $searchConfig['engine'] != ElasticSearch::ENGINE_NAME + && $searchConfig['engine'] == SearchEngine::ENGINE_MYSQL ) { return $this->resultFactory->errorByCode(Error::DEPLOY_WRONG_SEARCH_ENGINE); } diff --git a/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php b/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php index 29001079f2..c7c62d59ea 100644 --- a/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php +++ b/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php @@ -174,6 +174,20 @@ public function validateDataProvider(): array Success::class, true ], + [ + [ + 'engine' => 'elasticsearch7', + ], + Success::class, + true + ], + [ + [ + 'engine' => 'elasticsuite', + ], + Success::class, + true + ], ]; }