-
Notifications
You must be signed in to change notification settings - Fork 85
Light updates to the install-wp-tests.sh script
#356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
templates/install-wp-tests.sh
Outdated
| if [[ $1 =~ ^(y|yes)$ ]] | ||
| then | ||
| mysqladmin drop $DB_NAME -f --user="$DB_USER" --password="$DB_PASS"$EXTRA | ||
| if [ `which mariadb-admin` ]; then |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
Nice update! Moving to GIT that is better supported. |
Co-authored-by: Gary Jones <gamajo@gamajo.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Incorporating changes from #346
There was a problem hiding this 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.
| rm -rf $WP_CORE_DIR | ||
| mkdir -p $WP_CORE_DIR |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
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.
This comment was marked as resolved.
This comment was marked as resolved.
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>
|
@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. |
Based on changes in some of my own project.
Related:
install-wp-tests.shscript #322