Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Mar 27, 2024
1 parent 5a036ef commit fa240aa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion integration-tests/load/automationv2_1/automationv2_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/hex"
"fmt"
"io"
"math"
"math/big"
"net/http"
Expand Down Expand Up @@ -143,9 +144,20 @@ func setUpDataStreamsWireMock(url string) error {
return err
}
resp, err := http.Post(fmt.Sprintf("%s/__admin/mappings/save", url), "application/json", nil)
if err != nil || resp.StatusCode != 200 {
if err != nil {
return errors.New("error saving wiremock mappings")
}
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {
panic(err)
}
}(resp.Body)

if resp.StatusCode != 200 {
return errors.New("error saving wiremock mappings")
}

return nil
}

Expand Down

0 comments on commit fa240aa

Please sign in to comment.