Skip to content

Commit

Permalink
PA-27048 Update insrequester Mock (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamil-Najafov committed Jul 8, 2024
1 parent f627d5b commit 7fbd84e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion insdash/insdash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Test_createBatches(t *testing.T) {
})

t.Run("should_return_batches_by_record_limit", func(t *testing.T) {
batches, err := CreateBatches([]string{"test", "test"}, 10, kb64)
batches, err := CreateBatches([]string{"test", "test"}, 1, kb64)

assert.Nil(t, err, "err should be nil")
assert.Equal(t, 2, len(batches), "batches length should be equal to 2")
Expand Down
9 changes: 5 additions & 4 deletions insrequester/requester_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions insrequester/requester_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package insrequester

import (
"github.com/slok/goresilience/errors"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -66,7 +65,7 @@ func TestRequest_Get(t *testing.T) {
_, _ = r.Get(req)
}
_, err = r.Get(req)
assert.ErrorIs(t, err, errors.ErrCircuitOpen)
assert.ErrorIs(t, err, ErrCircuitBreakerOpen)
})

t.Run("it_should_apply_headers_properly", func(t *testing.T) {
Expand Down

0 comments on commit 7fbd84e

Please sign in to comment.