chore(api)!: added new fields to contract
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user