diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e432828..ffb4f45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -166,6 +166,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 { @@ -269,6 +274,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/Support/Helper/ThirdPartyPlugin.php b/tests/Support/Helper/ThirdPartyPlugin.php index 1893cd7..edf0ac5 100644 --- a/tests/Support/Helper/ThirdPartyPlugin.php +++ b/tests/Support/Helper/ThirdPartyPlugin.php @@ -65,23 +65,13 @@ public function deactivateThirdPartyPlugin($I, $name) // Wait for the Plugins page to load. $I->waitForElementVisible('body.plugins-php'); - // Depending on the Plugin name, perform deactivation. - switch ($name) { - case 'wpforms-lite': - // Using the check option results in a 502 Bad Gateway error. - $I->click('a#deactivate-' . $name); - break; - - default: - // Deactivate the Plugin. - $I->checkOption('//*[@data-slug="' . $name . '"]/th/input'); - $I->selectOption('action', 'deactivate-selected'); - $I->click('#doaction'); - - // Wait for the Plugins page to load with the Plugin deactivated, to confirm it deactivated. - $I->waitForElementVisible('table.plugins tr[data-slug=' . $name . '].inactive'); - break; - } + // Deactivate the Plugin. + $I->checkOption('//*[@data-slug="' . $name . '"]/th/input'); + $I->selectOption('action', 'deactivate-selected'); + $I->click('#doaction'); + + // Wait for the Plugins page to load with the Plugin deactivated, to confirm it deactivated. + $I->waitForElementVisible('table.plugins tr[data-slug=' . $name . '].inactive'); } /**