In issue 2236855, we had a situation where in one of the patches created we forgot to attach the /core/modules/file/css/file.formatter.generic.css file referenced in /core/modules/file/file.libraries.yml and yet the tests bot was green and happy. I don't think it should have been.

I'm sure this is something that should have a wider context than the referenced issue, though - how can we test that referenced css and other "non-code" files are actually where we say they should be?

Comments

swentel’s picture

Component: field system » file.module
dawehner’s picture

Component: file.module » asset library system

There are already quite some checks in LibraryDiscoveryParser so we could theoretically add a check that all the referenced assets really exist.
Its a question whether this would make the performance much worse as you would have to look up stuff in the file-system for each file.

rachel_norfolk’s picture

I was thinking the test for existence should be in the tests run by the testbots more than in running code.

Wim Leers’s picture

Status: Active » Closed (duplicate)
Related issues: +#2231385: Verify that the library files exist