Skip to content

Conversation

@swissspidy
Copy link
Member

if [[ $1 =~ ^(y|yes)$ ]]
then
mysqladmin drop $DB_NAME -f --user="$DB_USER" --password="$DB_PASS"$EXTRA
if [ `which mariadb-admin` ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just because MariaDB might exist locally, is that sufficient to know that the developer wants to use it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could allow overriding with a flag perhaps if needed.

@davidperezgar
Copy link

Nice update! Moving to GIT that is better supported.

@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the install-wp-tests.sh script with several improvements including migration from SVN to GitHub for downloading WordPress core and test files, addition of colored output, automatic update checking, and MariaDB support.

Changes:

  • Migrated from SVN to GitHub tar.gz archives for downloading WordPress and test suite files
  • Added colored terminal output for better user experience and error visibility
  • Implemented automatic script update checking functionality
  • Added MariaDB client support alongside MySQL

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 15 comments.

File Description
templates/install-wp-tests.sh Core script updates including GitHub migration, colored output, update checking, and MariaDB support
features/install-wp-tests.feature Updated test expectations to match new output messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +112 to 113
rm -rf $WP_CORE_DIR
mkdir -p $WP_CORE_DIR
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script removes the line that was deleting the previous WordPress installation (line 112 adds rm -rf $WP_CORE_DIR), but this happens after checking if wp-settings.php exists. If the check at line 105 passes and returns early, the cleanup never happens. This is correct behavior, but combined with the file-only check instead of a more comprehensive validation, it could leave stale files from previous installations that might interfere with tests.

Copilot uses AI. Check for mistakes.
swissspidy and others added 2 commits January 20, 2026 11:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This comment was marked as resolved.

Copilot AI and others added 5 commits January 20, 2026 10:32
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI and others added 6 commits January 20, 2026 11:19
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
- Modified download() to return error codes from curl/wget
- Updated check_for_updates() to check download() return value
- Added validation for empty downloaded files using -s flag
- Improved error messaging to distinguish between network failures and empty files

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 20, 2026

@swissspidy I've opened a new pull request, #364, to work on those changes. Once the pull request is ready, I'll request review from you.

@swissspidy swissspidy linked an issue Jan 22, 2026 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh install-wp-tests.sh script

4 participants