mediawiki-extensions-AbuseF.../tests
Dreamy Jazz 774f4f02ef Create protected variable access logs POSTSEND
Why:
* The ProtectedVarsAccessLogger::logViewProtectedVariableValue
  method creates a debounced log entry for accessing protected
  variable values.
* This log can be created when a user calls the 'abuselog' query
  API. This API query is made using a GET request.
* Because the ProtectedVarsAccessLogger creates the log
  when it is called, the TransactionProfiler raises a warning
  about writing to the primary DB on a GET request.
* We should address this warning by creating the log entry on
  POSTSEND, in a similar way to how the CheckUser extension
  creates CheckUser log entries.

What:
* Wrap the call to ProtectedVarsAccessLogger::log in
  ::logViewProtectedVariableValue with a DeferredUpdate callback
  that is run POSTSEND.
** As part of this, the expectations that the code only uses the
   replica DBs are silenced inside the DeferredUpdate as the
   PostSend-GET expectations do not usually allow for writes.
   The only other method would to be create the log via a job,
   but we want the log creation to occur quickly and reliably.

Bug: T379083
Change-Id: If14e65b27b0bdd4fd0b99319024ffa281bf44656
2024-11-11 14:33:47 +00:00
..
parserTests Support named capturing groups in get_matches() 2024-09-07 11:25:48 +00:00
parserTestsEquivset
phpunit Create protected variable access logs POSTSEND 2024-11-11 14:33:47 +00:00
selenium Update Selenium tests to obtain correctly element 2024-09-20 14:40:46 -07:00