feat: runtime manager

This commit is contained in:
Ilia Denisov
2026-04-28 20:39:18 +02:00
committed by GitHub
parent e0a99b346b
commit a7cee15115
289 changed files with 45660 additions and 2207 deletions
@@ -7,8 +7,8 @@ import (
"testing"
"time"
"galaxy/lobby/internal/adapters/applicationstub"
"galaxy/lobby/internal/adapters/gamestub"
"galaxy/lobby/internal/adapters/applicationinmem"
"galaxy/lobby/internal/adapters/gameinmem"
"galaxy/lobby/internal/domain/application"
"galaxy/lobby/internal/domain/common"
"galaxy/lobby/internal/domain/game"
@@ -24,15 +24,15 @@ func silentLogger() *slog.Logger {
}
type fixture struct {
games *gamestub.Store
applications *applicationstub.Store
games *gameinmem.Store
applications *applicationinmem.Store
svc *listmyapplications.Service
}
func newFixture(t *testing.T) *fixture {
t.Helper()
games := gamestub.NewStore()
apps := applicationstub.NewStore()
games := gameinmem.NewStore()
apps := applicationinmem.NewStore()
svc, err := listmyapplications.NewService(listmyapplications.Dependencies{
Games: games,
Applications: apps,
@@ -44,7 +44,7 @@ func newFixture(t *testing.T) *fixture {
func seedGame(
t *testing.T,
store *gamestub.Store,
store *gameinmem.Store,
id common.GameID,
gameType game.GameType,
name string,
@@ -75,7 +75,7 @@ func seedGame(
func seedApplication(
t *testing.T,
store *applicationstub.Store,
store *applicationinmem.Store,
id common.ApplicationID,
gameID common.GameID,
userID string,
@@ -180,8 +180,8 @@ func TestNewServiceRejectsMissingDeps(t *testing.T) {
name string
deps listmyapplications.Dependencies
}{
{"nil games", listmyapplications.Dependencies{Applications: applicationstub.NewStore()}},
{"nil applications", listmyapplications.Dependencies{Games: gamestub.NewStore()}},
{"nil games", listmyapplications.Dependencies{Applications: applicationinmem.NewStore()}},
{"nil applications", listmyapplications.Dependencies{Games: gameinmem.NewStore()}},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {