resourceloader: Remove slow structure test for checking getVersionHash
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 1 Aug 2019 00:19:45 +0000 (01:19 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 1 Aug 2019 15:33:23 +0000 (15:33 +0000)
commit8199e028fd1dd7a2b55f9f63951ea785cd6c68cd
treefaec2bba411fb54ea44cbc42858bf527fae2a61e
parentd64df8329b6826b1db0b1c5fcebbb821c95db61e
resourceloader: Remove slow structure test for checking getVersionHash

This isn't needed because the startup module validates this already.

The vast majority of modules are FileModule instances which can't be invalid,
because a separate test asserts that class already. This test existed for
validating the format of version hashes returned by a theoretical Module
sub class in an extension that (badly) overrides the getVersionHash method.

As of writing, no extension overrides that method. And more importantly,
the startup module already validates this at run-time, and logs a warning.
This commit turns that into an exception, which would get logged in a way
that Jenkins will fail the build if encountered.

This structure test, which computed the response for all registered modules,
previously took 3-5 seconds in CI.

Bug: T225730
Change-Id: Id2e37434b0ccd95dd2279f04e2230e9c06b09ccb
includes/resourceloader/ResourceLoaderStartUpModule.php
tests/phpunit/structure/ResourcesTest.php