Commit 1040228a52
Verified · cmc ci/build: success ci/test: success
Layout: unified · split
internal/control/stage3repo_test.go +6
| @@ -27,6 +27,9 @@ func dispatchIn(t *testing.T, st *store.Store, u store.User, root, stdin string, | ||
| 27 | 27 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} |
| 28 | 28 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(stdin)} |
| 29 | 29 | c.Cfg.Server.Root = root |
| 30 | // Fixtures write a lot as user 1; the write limiter is global to | |
| 31 | // the package, so leave its budget to the tests that exercise it. | |
| 32 | c.Cfg.Limits.WriteRate = -1 | |
| 30 | 33 | if code := Dispatch(c, argv); code != protocol.ExitOK { |
| 31 | 34 | t.Fatalf("%v: exit %d: %s", argv, code, errOut) |
| 32 | 35 | } |
| @@ -46,6 +49,9 @@ func atTerminalIn(t *testing.T, st *store.Store, u store.User, root string, argv | ||
| 46 | 49 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} |
| 47 | 50 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(""), Term: Term{Cols: 100}} |
| 48 | 51 | c.Cfg.Server.Root = root |
| 52 | // Fixtures write a lot as user 1; the write limiter is global to | |
| 53 | // the package, so leave its budget to the tests that exercise it. | |
| 54 | c.Cfg.Limits.WriteRate = -1 | |
| 49 | 55 | if code := Dispatch(c, argv); code != protocol.ExitOK { |
| 50 | 56 | t.Fatalf("%v: exit %d: %s", argv, code, errOut) |
| 51 | 57 | } |