File view with blame information shown in the left gutter beside each line.

barerepo / server / internal/config/lfs_test.go
23 lines · 594b · 133728eaa05486504991b230f9d4c7e986b7defc
log files threads runs releases config jump to file t
133728e barerepo 1mo
1
package config
133728e barerepo 1mo
2
133728e barerepo 1mo
3
import (
133728e barerepo 1mo
4
"strings"
133728e barerepo 1mo
5
"testing"
133728e barerepo 1mo
6
)
133728e barerepo 1mo
7
133728e barerepo 1mo
8
func TestSwitchingLargeFilesOnRefusesToStart(t *testing.T) {
133728e barerepo 1mo
9
cfg := Default()
133728e barerepo 1mo
10
cfg.Paths.Repos, cfg.Paths.Cache, cfg.Paths.Artifacts = "/a", "/b", "/c"
133728e barerepo 1mo
11
cfg.Behavior.AllowLFS = true
133728e barerepo 1mo
12
err := cfg.check()
133728e barerepo 1mo
13
if err == nil {
133728e barerepo 1mo
14
t.Fatal("allow_lfs came on and the config passed, which is the trap it was")
133728e barerepo 1mo
15
}
133728e barerepo 1mo
16
if !strings.Contains(err.Error(), "not built") {
133728e barerepo 1mo
17
t.Errorf("the error does not say why: %v", err)
133728e barerepo 1mo
18
}
133728e barerepo 1mo
19
cfg.Behavior.AllowLFS = false
133728e barerepo 1mo
20
if err := cfg.check(); err != nil {
133728e barerepo 1mo
21
t.Errorf("a config with large files off did not pass: %v", err)
133728e barerepo 1mo
22
}
133728e barerepo 1mo
23
}
history · rawbarerepo 0.1.0