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 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} | 27 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} |
| 28 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(stdin)} | 28 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(stdin)} |
| 29 | c.Cfg.Server.Root = root | 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 | if code := Dispatch(c, argv); code != protocol.ExitOK { | 33 | if code := Dispatch(c, argv); code != protocol.ExitOK { |
| 31 | t.Fatalf("%v: exit %d: %s", argv, code, errOut) | 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 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} | 49 | out, errOut := &bytes.Buffer{}, &bytes.Buffer{} |
| 47 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(""), Term: Term{Cols: 100}} | 50 | c := &Ctx{User: u, Scope: "full", Store: st, Stdout: out, Stderr: errOut, Stdin: strings.NewReader(""), Term: Term{Cols: 100}} |
| 48 | c.Cfg.Server.Root = root | 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 | if code := Dispatch(c, argv); code != protocol.ExitOK { | 55 | if code := Dispatch(c, argv); code != protocol.ExitOK { |
| 50 | t.Fatalf("%v: exit %d: %s", argv, code, errOut) | 56 | t.Fatalf("%v: exit %d: %s", argv, code, errOut) |
| 51 | } | 57 | } |