[wp-trac] [WordPress Trac] #52097: Site Health Loopback Test doesn't send admin cookies
WordPress Trac
noreply at wordpress.org
Sun Dec 20 11:15:07 UTC 2020
#52097: Site Health Loopback Test doesn't send admin cookies
-------------------------------+-----------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.6.1
Component: Site Health | Version: 5.6
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
-------------------------------+-----------------------
Comment (by Clorith):
There's another ticket also relying on being logged in to pass around
login checks... so thinking out loud, would it make sense to provide the
basic test here towards `site_url()` as discussed (I believe this is the
best way forward, and is what will happen for 5.6.1 any way), but to
resolve the other false positive, there's no good solution without faking
a user session as it stands right now.
Introducing a `live_only` boolean entry to the tests, this would be purely
optional, but if set, tests would not run during cron events, we could
then block off tests like checking if the REST Endpoint for editing a post
is valid, since it requires a logged in session with the appropriate
capabilities to run.
This would also allow for more flexibility inside tests, we would then do
the basic loopback check towards `site_url()` in the case of this ticket
during cron events, then when a logged in user checks site health
manually, it could also perform the additional check towards `admin_url()`
and give extended information if something should be wrong there?
The alternative would be to create a fake instance to an admin account,
log it in, run tests, log it back out, which feels wrong to me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52097#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list