common/test/client: Fix uninitialised LastRequestErr

This commit is contained in:
Robert Swain 2017-06-07 18:26:24 +02:00
parent 935f3275b9
commit 9b887aa696

View file

@ -101,6 +101,7 @@ func (r *Request) Do() error {
// DoUntilSuccess blocks and repeats the same request until the response returns the desired status code and body.
// It then closes the given channel and returns.
func (r *Request) DoUntilSuccess(done chan error) {
r.LastErr = &LastRequestErr{}
for {
if err := r.Do(); err != nil {
r.LastErr.Set(err)