Skip to content

Commit

Permalink
Update pkg/service/backup/service_backup_integration_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: karol-kokoszka <[email protected]>
  • Loading branch information
Michal-Leszczynski and karol-kokoszka authored Feb 28, 2024
1 parent fa7dccf commit d3c1ea5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/service/backup/service_backup_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ func (h *backupTestHelper) setInterceptorBlockEndpointOnFirstHost(method string,
h.Hrt.SetInterceptor(httpx.RoundTripperFunc(func(req *http.Request) (*http.Response, error) {
if req.Method == method && req.URL.Path == path {
mu.Lock()
defer mu.Unlock()

if brokenHost == "" {
h.T.Log("Setting broken host", req.Host)
brokenHost = req.Host
}
mu.Unlock()

if brokenHost == req.Host {
return nil, errors.New("dial error")
Expand Down

0 comments on commit d3c1ea5

Please sign in to comment.