Documentation ¶
Index ¶
- func BeAvailable() types.GomegaMatcher
- func ContainLines(expected ...interface{}) types.GomegaMatcher
- type BeAvailableMatcher
- type ServeMatcher
- func (sm *ServeMatcher) FailureMessage(actual interface{}) (message string)
- func (sm *ServeMatcher) Match(actual interface{}) (success bool, err error)
- func (sm *ServeMatcher) NegatedFailureMessage(actual interface{}) (message string)
- func (sm *ServeMatcher) OnPort(port int) *ServeMatcher
- func (sm *ServeMatcher) WithClient(client *http.Client) *ServeMatcher
- func (sm *ServeMatcher) WithDocker(docker occam.Docker) *ServeMatcher
- func (sm *ServeMatcher) WithEndpoint(endpoint string) *ServeMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeAvailable ¶
func BeAvailable() types.GomegaMatcher
BeAvailable matches if the actual occam.Container is running AND an HTTP request to at least one of its exposed ports completes without error.
func ContainLines ¶
func ContainLines(expected ...interface{}) types.GomegaMatcher
ContainLines matches if all of the 'expected' matchers match with lines (i.e. newline-delimited substrings) in the 'actual' string or fmt.Stringer. Matching lines must appear in the order that the 'expected' matchers are passed.
Types ¶
type BeAvailableMatcher ¶
func (*BeAvailableMatcher) FailureMessage ¶
func (m *BeAvailableMatcher) FailureMessage(actual interface{}) string
func (*BeAvailableMatcher) Match ¶
func (*BeAvailableMatcher) Match(actual interface{}) (bool, error)
func (*BeAvailableMatcher) NegatedFailureMessage ¶
func (m *BeAvailableMatcher) NegatedFailureMessage(actual interface{}) string
type ServeMatcher ¶ added in v0.1.0
type ServeMatcher struct {
// contains filtered or unexported fields
}
func Serve ¶ added in v0.1.0
func Serve(expected interface{}) *ServeMatcher
Serve matches if the actual occam.Container is running AND the response from an HTTP request to the container's exposed port matches the 'expected' matcher passed as an argument.
func (*ServeMatcher) FailureMessage ¶ added in v0.1.0
func (sm *ServeMatcher) FailureMessage(actual interface{}) (message string)
func (*ServeMatcher) Match ¶ added in v0.1.0
func (sm *ServeMatcher) Match(actual interface{}) (success bool, err error)
func (*ServeMatcher) NegatedFailureMessage ¶ added in v0.1.0
func (sm *ServeMatcher) NegatedFailureMessage(actual interface{}) (message string)
func (*ServeMatcher) OnPort ¶ added in v0.1.0
func (sm *ServeMatcher) OnPort(port int) *ServeMatcher
OnPort sets the container port that is expected to be exposed.
func (*ServeMatcher) WithClient ¶ added in v0.8.0
func (sm *ServeMatcher) WithClient(client *http.Client) *ServeMatcher
WithClient sets the http client that will be used to make the request. This allows for non-default client settings like custom redirect handling or adding a cookie jar.
func (*ServeMatcher) WithDocker ¶ added in v0.1.0
func (sm *ServeMatcher) WithDocker(docker occam.Docker) *ServeMatcher
WithDocker sets the occam.Docker that the matcher will use to access the 'actual' container's metadata.
func (*ServeMatcher) WithEndpoint ¶ added in v0.1.0
func (sm *ServeMatcher) WithEndpoint(endpoint string) *ServeMatcher
WithEndpoint sets the endpoint or subdirectory where the expected content should be available. For example, WithEndpoint("/health") will attempt to access the server's /health endpoint.