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

refactor to remove swarm-tournament dep from swarm-integration #1809

Merged
merged 6 commits into from
Apr 29, 2024

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Apr 28, 2024

The only reason the swarm-integration test had swarm-tournament as a dependency was because of a few validation functions in Swarm.Web.Tournament.Validate. However, this seemed to me like a strange place for those validation functions to live, since they had nothing to do with running a tournament in particular, and it meant that running the integration tests required having postgresql installed even though no databases are used in the integration tests at all.

This PR moves those validation functions to two more generic places: the first function to extract text from a sequence of log messages now lives in Swarm.Log, and the other two functions to check for bad errors and run a GameState to completion now live in a new module Swarm.Game.Step.Validate.

The only reason the `swarm-integration` test had `swarm-tournament` as
a dependency was because of a few validation functions in
`Swarm.Web.Tournament.Validate`.  However, this seemed to me like a
strange place for those validation functions to live, since they had
nothing to do with running a tournament in particular, and it meant
that running the integration tests required having postgresql
installed even though no databases are used in the integration tests
at all.

This PR moves those validation functions to two more generic places:
the first function to extract text from a sequence of log messages now
lives in `Swarm.Log`, and the other two functions to check for bad
errors and run a `GameState` to completion now live in a new module
`Swarm.Game.Step.Validate`.
@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Apr 29, 2024
@mergify mergify bot merged commit 078e8e6 into main Apr 29, 2024
9 checks passed
@mergify mergify bot deleted the refactor/integration-no-tournament-dep branch April 29, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants