Documentation ¶
Overview ¶
Package testctx provides a test context to be used in unit tests.
Index ¶
- func GitHubTokenType(ctx *context.Context)
- func GitLabTokenType(ctx *context.Context)
- func GiteaTokenType(ctx *context.Context)
- func New(opts ...Opt) *context.Context
- func NewWithCfg(c config.Project, opts ...Opt) *context.Context
- func Partial(ctx *context.Context)
- func Snapshot(ctx *context.Context)
- func WithFakeRuntime(ctx *context.Context)
- type Opt
- func Skip(keys ...skips.Key) Opt
- func WithCommit(commig string) Opt
- func WithCommitDate(d time.Time) Opt
- func WithCurrentTag(tag string) Opt
- func WithDate(t time.Time) Opt
- func WithEnv(env map[string]string) Opt
- func WithGitInfo(git context.GitInfo) Opt
- func WithPreviousTag(tag string) Opt
- func WithSemver(major, minor, patch uint64, prerelease string) Opt
- func WithToken(t string) Opt
- func WithTokenType(t context.TokenType) Opt
- func WithVersion(v string) Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitHubTokenType ¶
func GitLabTokenType ¶
func GiteaTokenType ¶
func WithFakeRuntime ¶
Types ¶
type Opt ¶
Opt is an option for a test context.
func WithCommit ¶
func WithCommitDate ¶
func WithCurrentTag ¶
func WithGitInfo ¶
func WithPreviousTag ¶
func WithSemver ¶
func WithTokenType ¶
func WithVersion ¶
Click to show internal directories.
Click to hide internal directories.