Documentation
¶
Overview ¶
Package smoke runs an end-to-end check of an OpenArch server: it creates a document, reads it, finds it with a query, and deletes it.
Index ¶
Constants ¶
View Source
const ( Pass = "pass" Fail = "fail" Skip = "skip" )
Step results.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
Ping(ctx context.Context) (api.PingResult, error)
CreateDocument(ctx context.Context, parent string, body []byte) (api.Document, error)
GetDocument(ctx context.Context, ref string) (api.Document, error)
Query(ctx context.Context, o api.QueryOptions) (api.QueryResult, error)
DeleteDocument(ctx context.Context, id string) error
}
API is the part of the API client that the smoke test uses.
type Options ¶
type Options struct {
URL string
// IndexTimeout is how long to wait for the background search index.
IndexTimeout time.Duration
// PollInterval is the wait between two index checks.
PollInterval time.Duration
}
Options are the inputs of Run.
type Report ¶
type Report struct {
URL string `json:"url"`
Version string `json:"version,omitempty"`
Document string `json:"document,omitempty"`
Steps []Step `json:"steps"`
Summary Summary `json:"summary"`
// contains filtered or unexported fields
}
Report is the result of a run.
func Run ¶
Run executes the steps. A step that depends on a failed step is skipped. The test document is always deleted when it was created.
func (Report) AuthFailed ¶
AuthFailed reports whether the run stopped because the credentials were rejected.
Click to show internal directories.
Click to hide internal directories.