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

database testing #12

Open
malytomas opened this issue Mar 21, 2022 · 3 comments
Open

database testing #12

malytomas opened this issue Mar 21, 2022 · 3 comments

Comments

@malytomas
Copy link
Member

is it possible to have some infrastructure for testing?
specifically, i would like to test behaviors in the database.

example testcase:
restore database from the repository,
run this sql to add a player, a ship, a move command, and run several ticks of simulation.
verify that the ship has reached its destination.

there are a lot of edge cases that would be nice to test regularly, such as multiple ships trading with one planet at once, or several ships transferring goods to one ship simultaneously, etc..

@tivvit
Copy link
Member

tivvit commented Mar 26, 2022

Definitely a good idea.

We can use the dev (docker-based) infrastructure for that. To ensure atomicity (clean db for each run) we just need to remove the previous container (from the previous run - it keeps the data).

For the tests we may use the SQL cli or a Python script. When we have that we can create a CI for that.

@tivvit
Copy link
Member

tivvit commented Aug 25, 2022

same as #117 ?

@malytomas
Copy link
Member Author

i consider #117 as significantly smaller subset than what i was hoping for in #12.

in #117 i want to test that all types of commands can run and do something. this is the minimum mandatory to make it usable at the trip.

in #12 i wanted to test for several scenarios. many edge cases etc.. i acknowledge that we do not have time for all of that anymore..

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

No branches or pull requests

2 participants