From 9725191be6dd5278d78b5706b7c747f7b0720e24 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 09:41:45 +1000 Subject: [PATCH] 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> --- exchanges/okx/okx_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchanges/okx/okx_test.go b/exchanges/okx/okx_test.go index 611d46e0..60a27458 100644 --- a/exchanges/okx/okx_test.go +++ b/exchanges/okx/okx_test.go @@ -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 {