diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 137f505d7..ec742687a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -216,6 +216,11 @@ jobs: location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php${{ matrix.php-versions }}-fpm.sock; + + # Prevent 502 Bad Gateway error "upstream sent too big header while reading response header from upstream" + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + fastcgi_busy_buffers_size 64k; } location ~ /\.ht { @@ -322,6 +327,13 @@ jobs: # Artifacts are data generated by this workflow that we want to access, such as log files, screenshots, HTML output. # The if: failure() directive means that this will run when the workflow fails e.g. if a test fails, which is needed # because we want to see why a test failed. + - name: Upload nginx Error Log to Artifact + if: failure() + uses: actions/upload-artifact@v4 + with: + name: nginx-error-log-${{ steps.test-group.outputs.value }}-${{ matrix.php-versions }}.log + path: /var/log/nginx/error.log + - name: Upload Test Results to Artifact if: failure() uses: actions/upload-artifact@v4 diff --git a/tests/EndToEnd/restrict-content/post-types/RestrictContentProductThirdPartyThemeOrPageBuilderCest.php b/tests/EndToEnd/restrict-content/post-types/RestrictContentProductThirdPartyThemeOrPageBuilderCest.php index b88c47b9a..e53916605 100644 --- a/tests/EndToEnd/restrict-content/post-types/RestrictContentProductThirdPartyThemeOrPageBuilderCest.php +++ b/tests/EndToEnd/restrict-content/post-types/RestrictContentProductThirdPartyThemeOrPageBuilderCest.php @@ -25,8 +25,6 @@ public function _before(EndToEndTester $I) // Activate Kit Plugin and third party Plugins. $I->activateKitPlugin($I); $I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice'); - $I->useTheme('uncode'); - $I->activateThirdPartyPlugin($I, 'uncode-core'); // Setup Kit Plugin, disabling JS. $I->setupKitPluginDisableJS($I); @@ -44,7 +42,9 @@ public function _before(EndToEndTester $I) */ public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(EndToEndTester $I) { - // Activate Visual Composer Page Builder. + // Activate theme and third party Plugins. + $I->useTheme('uncode'); + $I->activateThirdPartyPlugin($I, 'uncode-core'); $I->activateThirdPartyPlugin($I, 'uncode-wpbakery-page-builder'); // Programmatically create a Page using the Visual Composer Page Builder. @@ -81,8 +81,10 @@ public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(End checkNoWarningsAndNotices: false ); - // Deactivate Visual Composer Page Builder. + // Deactivate theme and third party Plugins. $I->deactivateThirdPartyPlugin($I, 'uncode-wpbakery-page-builder'); + $I->deactivateThirdPartyPlugin($I, 'uncode-core'); + $I->useTheme('twentytwentyfive'); } /** @@ -96,6 +98,10 @@ public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(End */ public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I) { + // Activate theme and third party Plugins. + $I->useTheme('uncode'); + $I->activateThirdPartyPlugin($I, 'uncode-core'); + // Programmatically create a Page using the Visual Composer Page Builder. $pageID = $I->havePostInDatabase( [ @@ -128,6 +134,10 @@ public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I) // Don't check for warnings and notices, as Uncode uses deprecated functions which WordPress 6.9 warn about. checkNoWarningsAndNotices: false ); + + // Deactivate theme and third party Plugins. + $I->deactivateThirdPartyPlugin($I, 'uncode-core'); + $I->useTheme('twentytwentyfive'); } /** @@ -141,9 +151,7 @@ public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I) */ public function _passed(EndToEndTester $I) { - // Deactivate Plugins and revert to default theme. - $I->deactivateThirdPartyPlugin($I, 'uncode-core'); - $I->useTheme('twentytwentyfive'); + // Deactivate Plugins. $I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice'); // Deactivate and reset Kit Plugin.