1
0
Fork 0

[marathon] Use test builder.

This change introduces the builder pattern to the Marathon unit tests in
order to simplify and reduce the amount of testing boilerplate.

Additional changes:

- Add missing unit tests.
- Make all tests look consistent.
- Use dedicated type for task states for increased type safety.
- Remove obsoleted getApplication function.
This commit is contained in:
Timo Reimann 2017-07-17 13:42:48 +02:00 committed by Ludovic Fernandez
parent 69c628b626
commit 8cb44598c0
4 changed files with 800 additions and 858 deletions

View file

@ -12,6 +12,11 @@ func Intp(i int) *int {
return &i
}
// Stringp returns a pointer to the given string value.
func Stringp(s string) *string {
return &s
}
// MustNewRequest creates a new http get request or panics if it can't
func MustNewRequest(method, urlStr string, body io.Reader) *http.Request {
request, err := http.NewRequest(method, urlStr, body)