JakeYallop / WaybackDownloader

A simple utility for downloading a website from the wayback machine.
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Add smoke test that executes in CI #14

Open JakeYallop opened 3 months ago

JakeYallop commented 3 months ago

Run a smoke test in CI - run the published executable with something like

WaybackDownloader.exe archive.org ./downloads -m exact --limitPages 1 -p SomeString1 -r 1 -v --clearHistory -f statuscode:200 -f mimetype:text/html --from 20230101 --to 2024

Do we want to add a way to limit snapshot page size? The CDX server supports a pageSize parameter.

JakeYallop commented 3 months ago

The executable supports passing --mockData since https://github.com/JakeYallop/WaybackDownloader/commit/6c2e2576a1cb663ec52260250806bf39b48e7c06 - the smoke test should use --mockData as a first test, then try a second time making a real request (to test the actual code path that will normally be used).

JakeYallop commented 3 months ago

Is there a way we fake it so that although our code makes a real request using the real HttpClientHandler, we still return mock data from somewhere else? Not actually hitting the wayback machine servers for testing would be ideal.