Skip to content

Commit

Permalink
Add more errors to request response
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Sep 14, 2020
1 parent 209dc54 commit ef37ff1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/tester/data_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ func (c *CheckDataTests) Print() {
// indicating if all endpoints received
// a non-500 response.
func RequestResponseTest(err error) bool {
return !(fetcher.Err(err) || errors.Is(err, utils.ErrNetworkNotSupported))
return !(fetcher.Err(err) ||
errors.Is(err, utils.ErrNetworkNotSupported) ||
errors.Is(err, syncer.ErrGetNetworkStatusFailed) ||
errors.Is(err, syncer.ErrFetchBlockFailed))
}

// ResponseAssertionTest returns a boolean
Expand Down
2 changes: 2 additions & 0 deletions pkg/tester/data_results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ func TestComputeCheckDataResults(t *testing.T) {
fetcher.ErrExhaustedRetries,
fetcher.ErrRequestFailed,
fetcher.ErrNoNetworks,
syncer.ErrGetNetworkStatusFailed,
syncer.ErrFetchBlockFailed,
utils.ErrNetworkNotSupported,
},
result: &CheckDataResults{
Expand Down

0 comments on commit ef37ff1

Please sign in to comment.