Documentation
¶
Overview ¶
Package extensionrepo runs repository tasks through the extension's export program. It owns checks, contract lookup, updates, staged install, and uninstall, as Extension repository in contract.md defines. Its test wrapper prints notices after Go's package results, as Test kit defines.
Index ¶
- Constants
- func Install(e extension.Extension, executable, dir string) error
- func Main(e extension.Extension)
- func Notice(message string) error
- func ScenarioRun(name string) string
- func Test(args []string) int
- func Uninstall(e extension.Extension, dir string) ([]string, error)
- type SpecKind
- type SpecLine
Constants ¶
const ScenarioEnv = "NCLY_TEST_SCENARIO"
ScenarioEnv names the scenario that a run of go test runs alone, for just scenario and for the repeat of signoff. When -run is ScenarioRun of that name, the test kit skips its coverage checks, which need every scenario.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install stages executable and the embedded sidecars of e, then publishes the executable last. The kit uses it with its built executable and a scratch extensions folder.
func Main ¶
Main runs a repository task, then exits. The export subcommand writes embedded sidecars for the staged build.
func Notice ¶
Notice records a test notice for Test to print after the packages finish. Outside Test, it writes to stdout, which go test can hide for passing packages.
func ScenarioRun ¶ added in v0.25.0
ScenarioRun is the -run pattern of go test that selects only the scenario testdata/script/<name>.txtar.
Types ¶
type SpecLine ¶ added in v0.25.0
type SpecLine struct {
Part string
Number int
Kind SpecKind
// Cells holds the cells of a header or a row, without spaces around them.
Cells []string
// ID holds the spec ID that starts a row or a bullet, or "".
ID string
// Rest holds the text after the bold label of a SpecLabel.
Rest string
}
A SpecLine is one line of spec.md, read as "Spec IDs" in the contract says. A part starts at a heading, or at a line that starts with a bold label, such as **Failures.**, and ends at the next one. The test kit reads the parts Failures and Acceptance, and finish reads Open lines and Limits.
func SpecLines ¶ added in v0.25.0
SpecLines reads each line of a spec.md. A row starts with its ID as its first cell. A bullet starts with its ID and a colon, such as - `duration`: the duration. So a bullet that only starts with code holds no ID. The header row of a table is the row above its separator.
Source Files
¶
- finish.go
- install.go
- ledger.go
- ledger_findings.go
- ledger_history.go
- ledger_run.go
- program.go
- readiness.go
- readiness_severity.go
- readiness_verdict.go
- recipes.go
- release.go
- release_command.go
- release_economy.go
- release_example.go
- release_install.go
- release_receipt.go
- scenario.go
- signoff.go
- signoff_receipt.go
- signoff_replay.go
- spec.go
- spec_matrix.go
- test.go
- update.go
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
extensionrepo
command
Command extensionrepo runs repository tasks through the shared SDK, including from a downloaded Nicely module.
|
Command extensionrepo runs repository tasks through the shared SDK, including from a downloaded Nicely module. |
|
Command test runs Go tests and prints their collected notices after the package results.
|
Command test runs Go tests and prints their collected notices after the package results. |