-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Summary (*)
When running integration and functional tests, were are encountering an error due to the following configuration check.
In dev/tests/integration/framework/Magento/TestFramework/Isolation/DeploymentConfig.php
, configuration values are filtered to exclude some configs (introduced in 44f174b). This check compares filtered config to the original store config, and causes a failure if there are differences:
ERROR: deployment configuration is corrupted. The application state is no longer valid.
Further tests may fail. This test failure may be misleading, if you are re-running it on a corrupted application.
Currently only compiled_config
is excluded. This filter is run only on endTest
, and not on startTestSuite
, when the original store configuration is loaded. Therefore, if compiled_config
is present in the original store configuration, the whole test suite fails to run.
Examples (*)
Run the integration test suite with the following app/etc/env.php
configuration:
<?php
return [
'backend' => [
'frontName' => 'admin'
],
'db' => [
'connection' => [
'indexer' => [
'host' => 'localhost',
'dbname' => 'm228',
'username' => 'root',
'password' => 'root',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1',
'persistent' => NULL
],
'default' => [
'host' => 'localhost',
'dbname' => 'm228',
'username' => 'root',
'password' => 'root',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1'
]
],
'table_prefix' => ''
],
'crypt' => [
'key' => '0b72247938120757f3ba1f491ef102e2'
],
'resource' => [
'default_setup' => [
'connection' => 'default'
]
],
'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE' => 'default',
'session' => [
'save' => 'files'
],
'cache_types' => [
'config' => 1,
'layout' => 1,
'block_html' => 1,
'collections' => 1,
'reflection' => 1,
'db_ddl' => 1,
'eav' => 1,
'customer_notification' => 1,
'config_integration' => 1,
'config_integration_api' => 1,
'target_rule' => 1,
'full_page' => 1,
'config_webservice' => 1,
'translate' => 1,
'vertex' => 1,
'compiled_config' => 1
],
'install' => [
'date' => 'Mon, 15 Apr 2019 20:24:44 +0000'
]
];
Proposed solution
Filter config values when loading configuration by changing line 54 in dev/tests/integration/framework/Magento/TestFramework/Isolation/DeploymentConfig.php
from
$this->config = $this->reader->load();
to
$this->config = $this->filterIgnoredConfigValues($this->reader->load());