Documentation ¶
Index ¶
- func DurToPtr(v time.Duration) *time.Duration
- func IntToPtr(v int) *int
- func PrintCheckPoint(testCase, message string, a ...interface{})
- func SendScaleAlert(sokarAddr, alertName string, fire bool) error
- func ServerAddresses() (sokarAddr string, nomadAddr string)
- func StrToPtr(v string) *string
- func WaitForNomad(t *testing.T, nomadAddr string, timeoutBetweenTries time.Duration, ...) (string, error)
- func WaitForSokar(t *testing.T, serviceAddr string, timeoutBetweenTries time.Duration, ...) error
- type JobAsserter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintCheckPoint ¶
func PrintCheckPoint(testCase, message string, a ...interface{})
PrintCheckPoint simple helper for printing check-points.
func SendScaleAlert ¶
SendScaleAlert sends a alert with the given name to sokar. Either the alert is firing (fire == true) or is expired (fire == false).
func ServerAddresses ¶
Types ¶
type JobAsserter ¶
type JobAsserter struct {
// contains filtered or unexported fields
}
JobAsserter helps on different assertion tasks. Especially those where multiple retries have to be done before considering a test as failed.
func NewJobAsserter ¶
func NewJobAsserter(t *testing.T, jobName string, waitTime time.Duration, maxTries int) *JobAsserter
NewJobAsserter creates a new JobAsserter
func (*JobAsserter) AssertJobCount ¶
func (ja *JobAsserter) AssertJobCount(expectedJobCount int, jobName string, obtainJobCountFunc func(jobName string) (int, error))
AssertJobCount asserts that the count of the nomad job is as expected
Source Files ¶
Click to show internal directories.
Click to hide internal directories.