Repository navigation
Support beta versions in install-wp-tests.sh and fix shellcheck findings - #408
Conversation
The release branch of the test suite only exists from RC1 on, so beta versions now use the test suite from trunk while RC versions keep using the release branch. Also quote variables and fix the other shellcheck findings. The database options are passed as an array, so a host and port are no longer glued onto the password argument. Supersedes #389. Co-Authored-By: nextgenthemes <nextgenthemes@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Supersedes #389 by @nextgenthemes, whose fork has since been archived, so the PR can't be updated anymore. Their changes are kept and credited as co-author, with the review feedback addressed.
Beta versions
The test suite's release branch (e.g.
branches/7.1) only exists from RC1 on, so installing the tests for a beta like7.1-beta1failed. Beta versions now use the test suite from trunk. RC versions keep using the release branch. WordPress itself is still downloaded from wordpress.org, which hosts beta archives.Shellcheck
The template is now free of shellcheck findings (
mainhas 30). Compared to #389, this fixes two regressions it introduced:--password="$DB_PASS""$EXTRA"glued the--host/--portoptions onto the password whenever a DB host was given, so every connection failed. That's why all MySQL Behat jobs failed on Fix beta versions, apply fixes for shellcheck hints #389. The options are now passed as a Bash array ("${EXTRA[@]}").$()changed6\.9into6\\.9, breaking the minor version lookup. It now uses${WP_VERSION//./\\.}.Trailing slashes are still stripped from
WP_CORE_DIRentirely (not just one), using a shell loop instead ofsed.Testing
shellcheck templates/install-wp-tests.shreports nothing.127.0.0.1:3306,127.0.0.1andlocalhostas the host. Both creating and recreating the database work.Generated by Claude Code
Summary by CodeRabbit