OKX: Fix panic in TestGetInsuranceFundInformation on connection failure (#2062)

* Initial plan

* Fix panic in TestGetInsuranceFundInformation on connection failure

Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com>
This commit is contained in:
Copilot
2025-09-18 09:41:45 +10:00
committed by GitHub
parent 6a40d32b0c
commit 9725191be6

View File

@@ -591,7 +591,7 @@ func TestGetInsuranceFundInformation(t *testing.T) {
arg.Underlying = mainPair.String()
r, err := e.GetInsuranceFundInformation(contextGenerate(), arg)
assert.NoError(t, err)
require.NoError(t, err)
assert.Positive(t, r.Total, "Total should be positive")
assert.NotEmpty(t, r.Details, "Should have some details")
for _, d := range r.Details {
@@ -605,7 +605,7 @@ func TestGetInsuranceFundInformation(t *testing.T) {
Underlying: mainPair.String(),
Limit: 2,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Positive(t, r.Total, "Total should be positive")
assert.NotEmpty(t, r.Details, "Should have some details")
for _, d := range r.Details {