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

[Feature]: Make it easier for devs to test rating of matches #355

Open
jauggy opened this issue Jul 10, 2024 · 0 comments
Open

[Feature]: Make it easier for devs to test rating of matches #355

jauggy opened this issue Jul 10, 2024 · 0 comments
Labels
feature request Not broken but something we want added medium priority

Comments

@jauggy
Copy link
Member

jauggy commented Jul 10, 2024

Describe the Feature

Currently it is very hard to test the rating endpoint as it requires multiple players. Ideally we want devs to be able to test the rating functions by themselves. I'm not sure exactly how to do this but I have some findings.

The way that it works is that there is a worker that processes battles that are yet to be processed in the database. We can run this locally as follows:

iex -S mix phx.server
Teiserver.Battle.Tasks.PostMatchProcessTask.perform(nil)

This function will look at teiserver_battle_matches table and then process ones where processed=false. If we can somehow inject fake battles here then we can run the processing and this allows us to test rating better.

Expected Behavior

Have some ability to test rating matches without needing multiple testers involved. See above for one idea.

@jauggy jauggy added the feature request Not broken but something we want added label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Not broken but something we want added medium priority
Projects
None yet
Development

No branches or pull requests

2 participants