Documentation ¶
Index ¶
- type AsyncResponse
- type Client
- func (c *Client) GetEventResult(ctx context.Context, hookID string, eventID string) (TestResult, error)
- func (c *Client) GetProject(ctx context.Context, hookID string) (Project, error)
- func (c *Client) GetTest(ctx context.Context, hookID string, testID string) (Test, error)
- func (c *Client) RunAllAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel) (AsyncResponse, error)
- func (c *Client) RunEphemeralAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel, ...) (AsyncResponse, error)
- func (c *Client) RunTagAsync(ctx context.Context, hookID string, testTag string, buildID string, ...) (AsyncResponse, error)
- func (c *Client) RunTestAsync(ctx context.Context, hookID string, testID string, buildID string, ...) (AsyncResponse, error)
- type Project
- type PublishedTest
- type Test
- type TestRequest
- type TestResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncResponse ¶
type AsyncResponse struct { ContextIDs []string `json:"contextIds,omitempty"` EventIDs []string `json:"eventIds,omitempty"` TaskID string `json:"taskId,omitempty"` TestIDs []string `json:"testIds,omitempty"` }
AsyncResponse describes the json response from the async api endpoints.
type Client ¶
Client describes an interface to the api-testing rest endpoints.
func (*Client) GetEventResult ¶ added in v0.115.0
func (*Client) GetProject ¶
GetProject returns Project metadata for a given hookID.
func (*Client) RunAllAsync ¶
func (c *Client) RunAllAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel) (AsyncResponse, error)
RunAllAsync runs all the tests for the project described by hookID and returns without waiting for their results.
func (*Client) RunEphemeralAsync ¶ added in v0.116.0
func (c *Client) RunEphemeralAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel, taskID string, test TestRequest) (AsyncResponse, error)
RunEphemeralAsync runs the tests for the project described by hookID and returns without waiting for their results.
func (*Client) RunTagAsync ¶
func (c *Client) RunTagAsync(ctx context.Context, hookID string, testTag string, buildID string, tunnel config.Tunnel) (AsyncResponse, error)
RunTagAsync runs all the tests for a testTag for a project described by hookID and returns without waiting for results.
func (*Client) RunTestAsync ¶
func (c *Client) RunTestAsync(ctx context.Context, hookID string, testID string, buildID string, tunnel config.Tunnel) (AsyncResponse, error)
RunTestAsync runs a single test described by testID for the project described by hookID and returns without waiting for results.
type PublishedTest ¶ added in v0.115.0
type PublishedTest struct {
Published Test
}
PublishedTest describes a published test.
type TestRequest ¶ added in v0.116.0
type TestRequest struct { Name string `json:"name"` Tags []string `json:"tags"` Input string `json:"input"` Unit string `json:"unit"` }
TestRequest represent a test to be executed
type TestResult ¶
type TestResult struct { EventID string `json:"_id,omitempty"` FailuresCount int `json:"failuresCount,omitempty"` Project Project `json:"project,omitempty"` Test Test `json:"test,omitempty"` ExecutionTimeSeconds int `json:"executionTimeSeconds,omitempty"` Async bool `json:"-"` TimedOut bool `json:"-"` }
TestResult describes the result from running an api test.