Skip to content

Commit

Permalink
Merge pull request #538 from magento-performance/ACPT-1323
Browse files Browse the repository at this point in the history
ACPT-1323: Fix Cms failures on app server
  • Loading branch information
andimov committed May 22, 2023
2 parents 42f0226 + 60f3391 commit b2903a5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class CategoryBlockTest extends GraphQlAbstract
{
/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Catalog/_files/category_tree.php
* @magentoApiDataFixture Magento/Cms/_files/block.php
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected function setUp(): void
/**
* Verify the fields of CMS Block selected by identifiers
*
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Cms/_files/blocks.php
*/
public function testGetCmsBlock()
Expand Down Expand Up @@ -71,6 +72,7 @@ public function testGetCmsBlock()
/**
* Verify the fields of CMS Block selected by block_id
*
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Cms/_files/blocks.php
*/
public function testGetCmsBlockByBlockId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException;
use Magento\Widget\Model\Template\FilterEmulate;

/**
* Test for cms block resolver cache
*/
class BlockTest extends ResolverCacheAbstract
{
/**
Expand Down Expand Up @@ -52,6 +55,7 @@ protected function setUp(): void
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoDataFixture Magento/Cms/_files/blocks.php
*/
public function testCmsSingleBlockResolverCacheAndInvalidationAsGuest()
Expand Down Expand Up @@ -90,6 +94,7 @@ public function testCmsSingleBlockResolverCacheAndInvalidationAsGuest()
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoDataFixture Magento/Cms/_files/block.php
* @magentoDataFixture Magento/Cms/_files/blocks.php
*/
Expand Down Expand Up @@ -134,6 +139,7 @@ public function testCmsMultipleBlockResolverCacheAndInvalidationAsGuest()
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoDataFixture Magento/Cms/_files/block.php
*/
public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDeleted()
Expand Down Expand Up @@ -171,6 +177,7 @@ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDeleted()
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoDataFixture Magento/Cms/_files/blocks.php
*/
public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDisabled()
Expand Down Expand Up @@ -209,6 +216,7 @@ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDisabled()
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoDataFixture Magento/Cms/_files/block.php
* @magentoDataFixture Magento/Store/_files/second_store.php
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ protected function setUp(): void
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Store/_files/store.php
* @magentoApiDataFixture Magento/Store/_files/inactive_store.php
*/
Expand Down Expand Up @@ -109,6 +110,7 @@ public function testDefaultWebsiteAvailableStoreConfigs(): void
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Store/_files/second_website_with_two_stores.php
*/
public function testNonDefaultWebsiteAvailableStoreConfigs(): void
Expand Down Expand Up @@ -206,6 +208,7 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php
* @magentoConfigFixture web/url/use_store 1
*/
Expand Down Expand Up @@ -266,6 +269,7 @@ public function testAllStoreConfigsWithCodeInUrlEnabled(): void
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php
*/
public function testCurrentGroupStoreConfigs(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ protected function setUp(): void
}

/**
* @magentoConfigFixture default_store web/seo/use_rewrites 1
* @magentoApiDataFixture Magento/Store/_files/store.php
* @throws NoSuchEntityException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function filterCustomAttributes($data)
if (isset($data[self::CUSTOM_ATTRIBUTES][0])) {
$data[self::CUSTOM_ATTRIBUTES] = $this->flattenCustomAttributesArrayToMap($data[self::CUSTOM_ATTRIBUTES]);
}
$customAttributesCodes = $this->getCustomAttributesCodes();
$customAttributesCodes = $this->getCustomAttributesCodes();
$data[self::CUSTOM_ATTRIBUTES] = array_intersect_key(
(array) $data[self::CUSTOM_ATTRIBUTES],
array_flip($customAttributesCodes)
Expand Down

0 comments on commit b2903a5

Please sign in to comment.