Merge pull request 'Lay out the publishing test as every gofmt agrees (hq issue 286)' (#46) from fix/gofmt-as-the-toolchain into main
This commit was merged in pull request #46.
This commit is contained in:
@@ -19,16 +19,17 @@ func publishing(t *testing.T, fetch func(string) (int, string, error),
|
||||
run func(name string, args []string) (string, error)) (Options, Deps, *asked) {
|
||||
t.Helper()
|
||||
runtime := &asked{answer: run}
|
||||
return Options{
|
||||
Registry: "127.0.0.1:5000",
|
||||
Timeout: time.Second,
|
||||
Wait: 0,
|
||||
}, Deps{
|
||||
// Each value named before it is returned: a return of several composite literals spanning lines is laid
|
||||
// out differently by the gofmt of one Go release and the next, and the build seat's is the one that
|
||||
// judges (novox/hq issue 286).
|
||||
options := Options{Registry: "127.0.0.1:5000", Timeout: time.Second, Wait: 0}
|
||||
deps := Deps{
|
||||
Run: runtime.run,
|
||||
Fetch: func(_ context.Context, url string) (int, string, error) {
|
||||
return fetch(url)
|
||||
},
|
||||
}, runtime
|
||||
}
|
||||
return options, deps, runtime
|
||||
}
|
||||
|
||||
// Nothing has ever been pushed under this name, so the registry says 404 — and that is an answer,
|
||||
|
||||
Reference in New Issue
Block a user