Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test for maps download #52

Open
p2004a opened this issue Apr 20, 2023 · 0 comments
Open

Add integration test for maps download #52

p2004a opened this issue Apr 20, 2023 · 0 comments

Comments

@p2004a
Copy link
Collaborator

p2004a commented Apr 20, 2023

Task is to extend https://github.com/beyond-all-reason/pr-downloader/blob/master/test/functional_test.py with test for map downloads as currently only game downloads using Rapid are tested.


pr-downloader takes --download-map with the name of map to download (name is SpringName, unique identifier), and calls endpoint defined by PRD_HTTP_SEARCH_URL environment variable to find where it's located and how to download it. E.g.: https://files-cdn.beyondallreason.dev/find?category=map&springname=Angel%20Crossing%201.4 for map with spring name Angel Crossing 1.4.

Parsing in pr-downloader of response is in: https://github.com/beyond-all-reason/pr-downloader/blob/master/src/Downloader/Http/HttpDownloader.cpp#L117

The integration test HTTP server needs to be extended to support such endpoint and serve some small dummy file and test that:

  • Download works correctly
  • When hash in metadata doesn't match the hash of downloaded file it should error out
  • When something fails, it should not create a final .sd7 file but always temp file first

PS: this doesn't require pr-downloader compilation, you can get latest stable binaries from https://github.com/beyond-all-reason/spring-launcher/tree/master/bin and just execute intgration test against them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant