Documentation
¶
Overview ¶
Package common contains reusable integration-suite step mechanics.
Index ¶
- func AwaitResponse(ctx context.Context, attempt ResponseAttempt, condition ResponseCondition, ...) error
- func ConfigureExpansion()
- func Expand(ctx context.Context, value string) (string, error)
- func GenerateAPIVersionAndStore(ctx context.Context, base, key string) error
- func GenerateAndStore(ctx context.Context, base, key string) error
- func GenerateContextAndStore(ctx context.Context, base, key string) error
- func GenerateResourceAndStore(ctx context.Context, base, key string) error
- func RenderResourceTemplate(ctx context.Context, name string, content []byte, table *godog.Table) (string, error)
- func ResourceTemplatePath(root, name string) (string, error)
- func StoredValue(ctx context.Context, key string) (string, error)
- type ResponseAttempt
- type ResponseCondition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwaitResponse ¶
func AwaitResponse( ctx context.Context, attempt ResponseAttempt, condition ResponseCondition, what string, ) error
AwaitResponse polls an operation until condition holds.
The attempt controls error classification. It should wrap transient transport errors with retry.Transient and return programming errors unchanged.
func ConfigureExpansion ¶
func ConfigureExpansion()
ConfigureExpansion installs context-backed expansion for suite placeholders.
func GenerateAPIVersionAndStore ¶
GenerateAPIVersionAndStore stores a unique semantic API version.
func GenerateAndStore ¶
GenerateAndStore creates a unique value and stores it in the runner's local scope.
func GenerateContextAndStore ¶
GenerateContextAndStore creates a unique API context and stores it in runner-local scope.
func GenerateResourceAndStore ¶
GenerateResourceAndStore creates a unique name accepted by DNS-style resource APIs.
func RenderResourceTemplate ¶
func RenderResourceTemplate(ctx context.Context, name string, content []byte, table *godog.Table) (string, error)
RenderResourceTemplate renders a canonical or legacy suite resource template.
func ResourceTemplatePath ¶
ResourceTemplatePath resolves a suite resource template name against the feature root, refusing absolute names and any path, symlinked or not, that escapes the root. A canonical template (resources/templates/<kind>.yaml) the root does not hold resolves to the copy the framework ships, so a project supplies only the templates that differ from it.
Types ¶
type ResponseAttempt ¶
ResponseAttempt obtains one response for a polling operation.
type ResponseCondition ¶
ResponseCondition reports whether a response satisfies a polling condition.