Documentation ¶
Index ¶
- func GivenCodeBuildIsEmpty(t *testing.T, svc codebuildiface.CodeBuildAPI, codeBuildProject string)
- func GivenSqsIsEmpty(t *testing.T, svc sqsiface.SQSAPI, sqsURL string)
- func ReplaceMock(m *mock.Mock, methodName string, arguments ...interface{}) *mock.Call
- func Retry(t *testing.T, maxAttempts int, sleep time.Duration, f func(r *R)) bool
- type R
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GivenCodeBuildIsEmpty ¶
func GivenCodeBuildIsEmpty(t *testing.T, svc codebuildiface.CodeBuildAPI, codeBuildProject string)
func ReplaceMock ¶
ReplaceMock allows you to mock out a method, overriding any previous expectations for that same method.
This is useful if you want to setup a generic stub object to reuse among multiple tests, but then tweak expectations for some of the tests.
Note that you need to pass the underlying mock object to this method, as `mock.Mock` does not expose any useful interfaces eg.
ReplaceMock(&myMock.Mock, "DoAThing", mock.Anything).Return(nil)
Types ¶
type R ¶
type R struct { // The number of current attempt. Attempt int // contains filtered or unexported fields }
R is passed to each run of a flaky test run, manages state and accumulates log statements.
Click to show internal directories.
Click to hide internal directories.