Skip to content

Clean up TestRunner and add lifecycle hook examples#28

Merged
Theauxm merged 2 commits into
mainfrom
feat/testrunner-cleanup
Mar 21, 2026
Merged

Clean up TestRunner and add lifecycle hook examples#28
Theauxm merged 2 commits into
mainfrom
feat/testrunner-cleanup

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented Mar 21, 2026

Summary

  • Remove monorepo vestiges from TestRunner sample — drop RepoName/RequiresPostgres from the model, simplify TestProjectRegistry to scan a single tests/ directory, rename ScanMonorepoJunctionScanProjectsJunction, trim unused fields from the React client
  • Add AuditLogHook as a global ITrainLifecycleHook in the GameServer sample, registered in both API and Scheduler via AddLifecycleHook<AuditLogHook>()
  • Add per-train OnCompleted/OnFailed overrides in BanPlayerTrain to demonstrate both hook approaches side by side

Salvaged from the unmerged tail of feat/testrunner-sample (PR #27), rebased cleanly onto current main.

Theauxm added 2 commits March 20, 2026 20:16
Simplify TestProjectRegistry to scan a single tests/ directory instead
of assuming monorepo structure. Drop RepoName and RequiresPostgres from
TestProject since the sample doesn't use them. Rename ScanMonorepoJunction
to ScanProjectsJunction and trim unused fields from the React client.
Add AuditLogHook as a global ITrainLifecycleHook that logs train
completion and failure events. Register it in both API and Scheduler
Program.cs via AddLifecycleHook<AuditLogHook>(). Also add per-train
hook overrides in BanPlayerTrain to show both approaches side by side.
@Theauxm Theauxm merged commit d3c107f into main Mar 21, 2026
1 check passed
@Theauxm Theauxm deleted the feat/testrunner-cleanup branch March 21, 2026 02:24
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented Mar 21, 2026

This PR is included in version 1.17.1

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

Successfully merging this pull request may close these issues.

1 participant