Documentation
¶
Index ¶
Constants ¶
const DirectCIHead = "0123456789012345678901234567890123456789"
const NotFound = `#!/bin/sh
printf 'HTTP/2.0 404 Not Found\nContent-Type: application/json\n\n{"message":"Not Found"}\n'
exit 1
`
orchCovNotFound is the `gh api --include` shape of an authoritative 404: a status line, headers, and a body, with a non-zero exit status.
const OneEndpointScript = `#!/bin/sh
S="$ORCHCOV_GH_STATE"
cat "$S/body"
exit "$(cat "$S/exit")"
`
Variables ¶
This section is empty.
Functions ¶
func InstallDirectCIGH ¶
func InstallDirectCIGH(t Environment)
func InstallTransientReadGH ¶
func InstallTransientReadGH(t Environment, script string)
InstallTransientReadGH puts a fake gh on PATH and pins the observer state dir so retries stay hermetic per test, without the reread-specific observation counter installRereadTestGH also wires up.
func PullRequestView ¶
func WithEmptyActionsRuns ¶
Types ¶
type Environment ¶
Environment supplies a fixture's private paths and process environment.
type Reporter ¶
type Reporter interface {
Helper()
Fatal(...any)
}
Reporter is the fatal error contract used by a concrete fixture. *testing.T implements it directly; an error observer can verify failing fixture inputs. Fatal must stop the current call, as testing.T.Fatal does.
type State ¶
type State struct {
Dir string
}
State is a scripted `gh` whose answers live in files, so a test can change one fact without rebuilding the whole script. It is deliberately independent of the other fixtures in this package: those install exactly the endpoints one verb needs, and the vendored reads below are shared by several.
func InstallGH ¶
func InstallGH(t Environment, script string) State
InstallGH writes a `gh` shell script onto PATH and returns the state directory its answers are read from.
func ScriptState ¶
func ScriptState(t Environment, script string) State
ScriptState writes a gh script whose answers are read from files and returns the state directory.