[wp-trac] [WordPress Trac] #55667: Tests_Basic::test_security_md() truncates the `.0` for `x.1` current version releases.
WordPress Trac
noreply at wordpress.org
Tue May 3 21:59:27 UTC 2022
#55667: Tests_Basic::test_security_md() truncates the `.0` for `x.1` current
version releases.
--------------------------------------+-----------------------------
Reporter: hellofromTonya | Owner: hellofromTonya
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version: 5.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Thanks for fixing this!
It looks like the test [https://github.com/WordPress/wordpress-
develop/runs/6280943442?check_suite_focus=true#step:18:208 still fails on
commits to older branches], or when run for older branches locally:
{{{
There was 1 failure:
1) Tests_Basic::test_security_md
SECURITY.md's version needs to be updated to 5.8.x.
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-5.8.x
+5.9.x
/var/www/tests/phpunit/tests/basic.php:28
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:51
}}}
I think the test could further be updated to avoid a failure in this case,
as well as to avoid a failure if `SECURITY.md` is updated prior to
branching, like in [53342].
It's fine if the file is updated to include a soon-to-be-released version
that's not the latest stable yet, the purpose of the test was to make sure
the latest version in `SECURITY.md` is either the current one or latest
stable, but not an older one.
See [attachment:55667.diff]. Includes minor code layout changes for
related tests for better readability. The fix could then be backported to
older branches too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55667#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list