feat: runtime manager
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"galaxy/lobby/internal/adapters/gamestub"
|
||||
"galaxy/lobby/internal/adapters/invitestub"
|
||||
"galaxy/lobby/internal/adapters/gameinmem"
|
||||
"galaxy/lobby/internal/adapters/inviteinmem"
|
||||
"galaxy/lobby/internal/domain/common"
|
||||
"galaxy/lobby/internal/domain/game"
|
||||
"galaxy/lobby/internal/domain/invite"
|
||||
@@ -31,16 +31,16 @@ func fixedClock(at time.Time) func() time.Time { return func() time.Time { retur
|
||||
|
||||
type fixture struct {
|
||||
now time.Time
|
||||
games *gamestub.Store
|
||||
invites *invitestub.Store
|
||||
games *gameinmem.Store
|
||||
invites *inviteinmem.Store
|
||||
game game.Game
|
||||
}
|
||||
|
||||
func newFixture(t *testing.T) *fixture {
|
||||
t.Helper()
|
||||
now := time.Date(2026, 4, 25, 10, 0, 0, 0, time.UTC)
|
||||
games := gamestub.NewStore()
|
||||
invites := invitestub.NewStore()
|
||||
games := gameinmem.NewStore()
|
||||
invites := inviteinmem.NewStore()
|
||||
|
||||
gameRecord, err := game.New(game.NewGameInput{
|
||||
GameID: "game-private",
|
||||
@@ -196,7 +196,7 @@ func TestRevokeGameNotFound(t *testing.T) {
|
||||
// game path is a defensive guard, but the surfaced error must be
|
||||
// subject_not_found rather than forbidden.
|
||||
svc, err := revokeinvite.NewService(revokeinvite.Dependencies{
|
||||
Games: gamestub.NewStore(),
|
||||
Games: gameinmem.NewStore(),
|
||||
Invites: f.invites,
|
||||
Clock: fixedClock(f.now),
|
||||
Logger: silentLogger(),
|
||||
|
||||
Reference in New Issue
Block a user