mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-04 15:35:25 +08:00
Route the two filesystem operations ToolDataPathFiles performs (os.walk in update_files, os.path.exists in exists/update_files) through an injectable ToolDataFilesystem protocol, defaulting to a real _OsFilesystem so all callers are unaffected. ToolDataTableManager threads an optional filesystem argument to its ToolDataPathFiles. Rework the walk-count regression tests to drive this seam with a counting CountingFilesystem instead of monkeypatching ToolDataPathFiles, per review feedback preferring an actual implementation over mocking. The tests still assert one walk per config-load pass, one per reload pass, and zero walks for exists() outside a pass.