This commit is contained in:
2026-10-03 12:38:11 +07:00
parent 119b22d63e
commit c16c1ed5ac
22 changed files with 34 additions and 20 deletions
@@ -1,3 +1,4 @@
// Package file_service handles file upload and download operations.
package file_service
import (
@@ -1,3 +1,4 @@
// Package gameplay_service implements team gameplay operations.
package gameplay_service
import (
+1 -1
View File
@@ -79,7 +79,7 @@ func TestStreamableHTTPEndToEnd(t *testing.T) {
// Проверка, что структуры моков сериализуемы (защита от изменения типов
// storytelling/game_service без обновления моков).
func TestMockTypesUsable(t *testing.T) {
func TestMockTypesUsable(_ *testing.T) {
_ = defaultStory()
_ = defaultGame()
_ = (*game_model.Game)(nil)
@@ -25,14 +25,14 @@ type fakeGamePlayer struct {
viaMCP bool
}
func (f *fakeGamePlayer) GetTeamActions(_ context.Context, teamID int, password string) (*storytelling.Story, *game_model.Game, []actions_repo.Action, error) {
func (f *fakeGamePlayer) GetTeamActions(_ context.Context, _ int, _ string) (*storytelling.Story, *game_model.Game, []actions_repo.Action, error) {
if f.err != nil {
return nil, nil, nil, f.err
}
return f.story, f.game, nil, nil
}
func (f *fakeGamePlayer) AddTeamAction(_ context.Context, teamID int, password, code string, viaMCP bool) error {
func (f *fakeGamePlayer) AddTeamAction(_ context.Context, _ int, _, _ string, viaMCP bool) error {
f.viaMCP = viaMCP
if f.err != nil {
return f.err
@@ -12,6 +12,7 @@ import (
"net/url"
"strings"
"time"
// Ensure timezone data is available in minimal runtime images.
_ "time/tzdata"
"evening_detective_server/internal/modules/email_sender"
@@ -68,14 +68,14 @@ func TestConclusionLifecycle(t *testing.T) {
if err != nil {
t.Fatal(err)
}
copy, err := svc.GetFullScenarioByID(ctx, imported)
importedScenario, err := svc.GetFullScenarioByID(ctx, imported)
if err != nil {
t.Fatal(err)
}
if copy.Story.Conclusion == nil || copy.Story.Conclusion.Text != conclusion.Text {
if importedScenario.Story.Conclusion == nil || importedScenario.Story.Conclusion.Text != conclusion.Text {
t.Fatal("lost conclusion on import")
}
name := strings.TrimPrefix(copy.Story.Conclusion.Video, testDomain)
name := strings.TrimPrefix(importedScenario.Story.Conclusion.Video, testDomain)
file, err := storage.Get(ctx, name)
if err != nil || name == "ending.mp4" || string(file.Data) != "video" {
t.Fatalf("video import: %q, %v", name, err)
@@ -134,7 +134,7 @@ func (s *fakeStorage) Delete(_ context.Context, name string) error {
return nil
}
func (s *fakeStorage) MimeType(filename string) string {
func (s *fakeStorage) MimeType(_ string) string {
return ""
}