• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

welovemedia / ffmate / 18144468504

30 Sep 2025 09:52PM UTC coverage: 59.573% (-0.9%) from 60.451%
18144468504

push

github

YoSev
test: fix tests after label rebase

12 of 13 new or added lines in 7 files covered. (92.31%)

282 existing lines in 15 files now uncovered.

2346 of 3938 relevant lines covered (59.57%)

15.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.65
/internal/database/model/task.go
1
package model
2

3
import (
4
        "github.com/welovemedia/ffmate/v2/internal/dto"
5
        "gorm.io/gorm"
6
)
7

8
type Task struct {
9
        OutputFile       *dto.RawResolved       `gorm:"type:jsonb"`
10
        Client           *Client                `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;foreignKey:ClientIdentifier;references:Identifier"`
11
        PostProcessing   *dto.PrePostProcessing `gorm:"type:jsonb"`
12
        PreProcessing    *dto.PrePostProcessing `gorm:"type:jsonb"`
13
        Webhooks         *dto.DirectWebhooks    `gorm:"type:jsonb"`
14
        Metadata         *dto.MetadataMap       `gorm:"serializer:json"`
15
        Command          *dto.RawResolved       `gorm:"type:jsonb"`
16
        InputFile        *dto.RawResolved       `gorm:"type:jsonb"`
17
        DeletedAt        gorm.DeletedAt         `gorm:"index"`
18
        Name             string
19
        Source           dto.TaskSource
20
        Status           dto.TaskStatus `gorm:"index"`
21
        Error            string
22
        ClientIdentifier string `gorm:"index"`
23
        UUID             string
24
        Batch            string
25
        Labels           []Label `gorm:"many2many:task_labels;"`
26
        Priority         uint
27
        Retries          int
28
        Retried          int
29
        Remaining        float64
30
        UpdatedAt        int64 `gorm:"autoUpdateTime:milli"`
31
        ID               uint  `gorm:"primarykey"`
32
        Progress         float64
33
        CreatedAt        int64 `gorm:"autoCreateTime:milli"`
34
        StartedAt        int64
35
        FinishedAt       int64
×
36
}
×
UNCOV
37

×
38
func (m *Task) ToDTO() *dto.Task {
77✔
39
        var labels = make([]string, len(m.Labels))
77✔
40
        for i, label := range m.Labels {
288✔
41
                labels[i] = label.Value
211✔
42
        }
211✔
UNCOV
43

×
44
        d := &dto.Task{
77✔
45
                UUID: m.UUID,
77✔
46

77✔
47
                Name:  m.Name,
77✔
48
                Batch: m.Batch,
77✔
49

77✔
50
                Command:    m.Command,
77✔
51
                InputFile:  m.InputFile,
77✔
52
                OutputFile: m.OutputFile,
77✔
53

77✔
54
                Metadata: m.Metadata,
77✔
55

77✔
56
                Status:    m.Status,
77✔
57
                Progress:  m.Progress,
77✔
58
                Remaining: m.Remaining,
77✔
59

77✔
60
                Labels:  labels,
77✔
61
                Retries: m.Retries,
77✔
62
                Retried: m.Retried,
77✔
63

77✔
64
                Error: m.Error,
77✔
65

77✔
66
                Source: m.Source,
77✔
67

77✔
68
                Priority: m.Priority,
77✔
69

77✔
70
                Webhooks: m.Webhooks,
77✔
71

77✔
72
                PreProcessing:  m.PreProcessing,
77✔
73
                PostProcessing: m.PostProcessing,
77✔
74

77✔
75
                StartedAt:  m.StartedAt,
77✔
76
                FinishedAt: m.FinishedAt,
77✔
77

77✔
78
                CreatedAt: m.CreatedAt,
77✔
79
                UpdatedAt: m.UpdatedAt,
77✔
80
        }
77✔
81

77✔
82
        if m.Client != nil {
154✔
83
                d.Client = &dto.Client{
77✔
84
                        Identifier:         m.Client.Identifier,
77✔
85
                        Session:            m.Client.Session,
77✔
86
                        Cluster:            m.Client.Cluster,
77✔
87
                        OS:                 m.Client.OS,
77✔
88
                        Arch:               m.Client.Arch,
77✔
89
                        Version:            m.Client.Version,
77✔
90
                        MaxConcurrentTasks: m.Client.MaxConcurrentTasks,
77✔
91
                        LastSeen:           m.Client.LastSeen,
77✔
92
                }
77✔
93
        }
77✔
94

95
        return d
77✔
96
}
97

98
func (Task) TableName() string {
46✔
99
        return "tasks"
46✔
100
}
46✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc