#390·tealdeer

Make almost all tests offline

Author: niklasmohrinCreated Nov 14, 2024Updated Jul 25, 2025
Labelstestingchore

We have a lot of tests that initially run tldr --update. While we have now migrated some of them to just copy some pages on the disk, there are still some that need to call --update, for example to check the output of --update itself.

Running --update to actually download the pages from the tldr-pages repository is suboptimal, and we should do it as little as possible. This would a) speed up the tests, because they don't need to download the whole archive from the internet, b) remove unneeded internet traffic and c) make the tests reproducible and runnable in offline environments (like nix builds).

To achieve this, we can use the archive_source setting from #337 and spin up a local server for the tests ourselves. Almost all tests should use this, except for maybe one or two that check that downloading from the tldr-pages release still works.