updates proto

This commit is contained in:
2026-10-01 14:19:43 +07:00
parent 1887b5b9a1
commit d9c5ca2956
27 changed files with 1897 additions and 1872 deletions
+4 -4
View File
@@ -40,7 +40,7 @@ func (s *testStub) UploadScenarioArchive(_ context.Context, req *httpbody.HttpBo
s.mu.Lock()
defer s.mu.Unlock()
s.uploaded = append([]byte(nil), req.Data...)
return &proto.UploadScenarioArchiveRsp{Id: 42}, nil
return &proto.UploadScenarioArchiveRsp{ID: 42}, nil
}
func (s *testStub) DownloadScenarioArchive(ctx context.Context, _ *proto.DownloadScenarioArchiveReq) (*httpbody.HttpBody, error) {
@@ -81,7 +81,7 @@ func (s *testStub) getUploaded() []byte {
}
func (s *testStub) DownloadTeamQR(ctx context.Context, req *proto.GetGameReq) (*httpbody.HttpBody, error) {
if req.Id != 7 {
if req.ID != 7 {
return nil, status.Error(codes.NotFound, "Игра не найдена")
}
data, err := team_qr_pdf.Generate([]team_qr_pdf.Card{{Name: "Знатоки", URL: "https://example.org/team-story/1?password=test"}})
@@ -204,8 +204,8 @@ func TestGatewayUploadRawZip(t *testing.T) {
if resp.StatusCode != http.StatusOK {
t.Fatalf("status = %d, body = %s", resp.StatusCode, body)
}
if !strings.Contains(string(body), `"id":42`) {
t.Errorf("ответ = %s, want id 42", body)
if !strings.Contains(string(body), `"ID":42`) {
t.Errorf("ответ = %s, want ID 42", body)
}
if got := stub.getUploaded(); !bytes.Equal(got, raw) {
t.Errorf("сервер получил %q, want %q", got, raw)
File diff suppressed because it is too large Load Diff