Add controller tests for GameController's single-game endpoints - #77
Merged
dmccoystephenson merged 1 commit intoAug 2, 2026
Merged
Conversation
GameControllerAuthTest only covered the authenticated /api/session/* routes, leaving /state, /tick, /command, /api/reset, /api/decision, and /api/ruler-stats — including the /api/decision exception-to-HTTP-status mapping — with no controller-level coverage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric:
Repo-specific:
Summary: test-only PR adding controller-layer coverage for GameController's six previously-untested single-game endpoints, empirically verified to catch real regressions. No follow-up needed on this PR. This comment was drafted during a Gardener session (Stephenson-Software/gardener). |
dmccoystephenson
deleted the
feature/game-controller-single-game-endpoint-tests
branch
August 2, 2026 22:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GameControllerTest, a@WebMvcTestcovering the six single-game (unauthenticated, shared-GameService-state) endpoints onGameController:GET /state,POST /tick,POST /command,POST /api/reset,GET /api/ruler-stats, andPOST /api/decision.GameControllerAuthTest(existing) only exercises the authenticated/api/session/*routes; the endpoints above had zero controller-level coverage, most notably the/api/decisionexception-to-HTTP-status mapping (IllegalStateException→ 409 cooldown,IllegalArgumentException→ 400 invalid choice, missing category/choice → 400) which previously had no test at any layer.Scope note
This is a Stage B (unit-test expansion) cycle. The single open issue in the backlog (#55, "Make the dashboard layout configurable and persist it per account") requires reorder/show-hide UI plus new server-side per-user persistence — too large to fully close in one scoped PR without leaving the issue partially resolved, so it was left open and deferred rather than picked for this cycle.
Module(s) touched
backendonly (test sources)Test plan
mvn clean testinbackend/— 267 tests, 0 failures (up from 256; +11 new)mvn clean testinweb-client/— 14 tests, 0 failures (unaffected, included to confirm no cross-module drift)-Dtest=GameControllerTest)Closes: none (test-only addition, no tracked issue for this gap)
This PR description was drafted during a Gardener session (Stephenson-Software/gardener).