From 0a87464b42c90e04b32040b4841b28a06a29f409 Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Mon, 2 Dec 2024 09:22:02 +0100 Subject: [PATCH] Disable block patterns caching caching is dependent on the path, however it differs for the test run and wp-cli so it produces notices and tests fail [MAILPOET-6353] --- tests_env/docker/codeception/docker-entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests_env/docker/codeception/docker-entrypoint.sh b/tests_env/docker/codeception/docker-entrypoint.sh index f2cb2c2de9..d6f57add3b 100755 --- a/tests_env/docker/codeception/docker-entrypoint.sh +++ b/tests_env/docker/codeception/docker-entrypoint.sh @@ -122,6 +122,13 @@ if [[ $SKIP_PLUGINS != "1" ]]; then unzip -q -o "$AUTOMATEWOO_ZIP" -d /wp-core/wp-content/plugins/ fi + # Install MU plugin that disables blocks patterns caching – it's needed for acceptance tests + # caching is dependent on the path, however it differs for the test run and wp-cli so it produces notices and tests fail + if [[ ! -f "/wp-core/wp-content/mu-plugins/woo-cache-disable.php" ]]; then + mkdir -p /wp-core/wp-content/mu-plugins + echo " "/wp-core/wp-content/mu-plugins/woo-cache-disable.php" + fi + ACTIVATION_CONTEXT=$HTTP_HOST # For integration tests in multisite environment we need to activate the plugin for correct site that is loaded in tests # The acceptance tests activate/deactivate plugins using a helper.