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

welovemedia / ffmate / 18139275350

30 Sep 2025 06:10PM UTC coverage: 64.011% (+0.03%) from 63.979%
18139275350

push

github

YoSev
feat: add basic-auth support

45 of 59 new or added lines in 8 files covered. (76.27%)

2 existing lines in 1 file now uncovered.

2234 of 3490 relevant lines covered (64.01%)

13.87 hits per line

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

81.25
/testsuite/testserver/testserver.go
1
package testserver
2

3
import (
4
        "encoding/json"
5
        "testing"
6

7
        "github.com/google/uuid"
8
        "github.com/welovemedia/ffmate/v2/internal/cfg"
9
        "goyave.dev/goyave/v5"
10
        "goyave.dev/goyave/v5/config"
11
        _ "goyave.dev/goyave/v5/database/dialect/sqlite"
12
        "goyave.dev/goyave/v5/middleware/parse"
13
        "goyave.dev/goyave/v5/util/testutil"
14
)
15

16
var c = map[string]any{
17
        "app": map[string]any{
18
                "name":    "ffmate",
19
                "version": "test-1.0.0",
20
        },
21
        "database": map[string]any{
22
                "connection": "sqlite3",
23
                "name":       ":memory:",
24
        },
25
        "auth": map[string]any{
26
                "basic": map[string]any{
NEW
27
                        "username": "user",
×
NEW
28
                        "password": "pass",
×
NEW
29
                },
×
NEW
30
        },
×
UNCOV
31
}
×
UNCOV
32

×
33
func New(t *testing.T) *testutil.TestServer {
44✔
34
        b, _ := json.Marshal(c)
44✔
35
        conf, _ := config.LoadJSON(string(b))
44✔
36

44✔
37
        if !cfg.Has("ffmate.identifier") {
48✔
38
                cfg.Set("ffmate.identifier", "test-client")
4✔
39
        }
4✔
40
        if !cfg.Has("ffmate.isAuth") {
47✔
41
                cfg.Set("ffmate.isAuth", false)
3✔
42
        }
3✔
43
        cfg.Set("ffmate.session", uuid.NewString())
44✔
44
        cfg.Set("ffmate.maxConcurrentTasks", 3)
44✔
45
        cfg.Set("ffmate.isTray", true)
44✔
46
        cfg.Set("ffmate.isCluster", false)
44✔
47
        cfg.Set("ffmate.isFFmpeg", false)
44✔
48
        cfg.Set("ffmate.debug", "")
44✔
49
        cfg.Set("ffmate.isDocker", false)
44✔
50
        cfg.Set("ffmate.isCluster", false)
44✔
51

44✔
52
        server := testutil.NewTestServerWithOptions(t, goyave.Options{Config: conf})
44✔
53

44✔
54
        // add global parsing
44✔
55
        server.Router().GlobalMiddleware(&parse.Middleware{
44✔
56
                MaxUploadSize: 10,
44✔
57
        })
44✔
58
        return server
44✔
59
}
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