Documentation
¶
Overview ¶
Package runtime exposes process and timing dependencies for command tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandPath ¶ added in v0.0.3
CommandPath returns a user-facing command path for the current command tree.
func OpenBrowser ¶
OpenBrowser opens rawURL through the configured browser hook or OpenURL.
Types ¶
type CommandRunner ¶
type CommandRunner interface {
Run(ctx context.Context, name string, args ...string) ([]byte, error)
}
CommandRunner runs an external command.
type CommandRunnerFunc ¶ added in v0.0.2
CommandRunnerFunc adapts a function to CommandRunner.
type Deps ¶
type Deps struct {
HTTPClient apiclient.HttpRequestDoer
// APIBaseURL overrides the compiled cloud API URL for tests. Synthetic
// local configs supply their API URL through ConfigLoader instead.
APIBaseURL string
OpenBrowser func(string) error
NewTimer func(time.Duration) Timer
NewTicker func(time.Duration) Ticker
ConfigLoader func() (*config.Config, error)
LocalCommandRunner CommandRunner
UpdateCommandRunner CommandRunner
GitCommandRunner CommandRunner
ExecutablePath string
UpdateGitHubAPIURL string
CommandPathPrefix string
}
Deps captures runtime dependencies that command and service tests replace.
Click to show internal directories.
Click to hide internal directories.