chore(api)!: added new fields to contract

This commit is contained in:
ITQ
2025-12-20 18:06:28 +03:00
parent 31738d3a0a
commit acfe7275eb
6 changed files with 60 additions and 19 deletions
+6 -3
View File
@@ -30,6 +30,7 @@ func TestTaskService(t *testing.T) {
InCompetitionPosition: 1,
MaxPoints: 100,
MaxAttempts: 10,
AnswerUrl: "https://example.com/answer",
Type: pb.TaskType_TASK_TYPE_INPUT,
}
@@ -51,6 +52,7 @@ func TestTaskService(t *testing.T) {
InCompetitionPosition: 1,
MaxPoints: 100,
MaxAttempts: 10,
AnswerUrl: "https://example.com/answer",
Type: pb.TaskType_TASK_TYPE_INPUT,
CreatedAt: timestamppb.Now(),
UpdatedAt: timestamppb.Now(),
@@ -72,6 +74,7 @@ func TestTaskService(t *testing.T) {
InCompetitionPosition: 1,
MaxPoints: 150,
MaxAttempts: 5,
AnswerUrl: "https://example.com/answer-updated",
Type: pb.TaskType_TASK_TYPE_CHECKER,
}
@@ -112,8 +115,8 @@ func TestTaskService(t *testing.T) {
showPrivate := true
req := &pb.GetTaskAttachmentsRequest{TaskId: taskID, ShowPrivate: &showPrivate}
expectedAttachments := []*pb.TaskAttachment{
{Id: "att1", FileUrl: "url1", IsPublic: true},
{Id: "att2", FileUrl: "url2", IsPublic: false},
{Id: "att1", FileUrl: "url1", Mountpoint: "mp1", IsPublic: true},
{Id: "att2", FileUrl: "url2", Mountpoint: "mp2", IsPublic: false},
}
mockRepo.EXPECT().GetTaskAttachments(ctx, taskID, showPrivate).Return(expectedAttachments, nil)
@@ -128,7 +131,7 @@ func TestTaskService(t *testing.T) {
showPrivate := false
req := &pb.GetTaskAttachmentsRequest{TaskId: taskID, ShowPrivate: &showPrivate}
expectedAttachments := []*pb.TaskAttachment{
{Id: "att1", FileUrl: "url1", IsPublic: true},
{Id: "att1", FileUrl: "url1", Mountpoint: "mp1", IsPublic: true},
}
mockRepo.EXPECT().GetTaskAttachments(ctx, taskID, showPrivate).Return(expectedAttachments, nil)