From c5764e7a3c23cb80869455085121dfbad9ed5986 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Mon, 5 Feb 2024 21:07:12 +0300 Subject: [PATCH] validatorapi: fixing failing tests (#2857) Fixing broken tests. category: bug ticket: none --- core/validatorapi/router_internal_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/validatorapi/router_internal_test.go b/core/validatorapi/router_internal_test.go index c656c41fc..5043f05ca 100644 --- a/core/validatorapi/router_internal_test.go +++ b/core/validatorapi/router_internal_test.go @@ -350,8 +350,11 @@ func TestRawRouter(t *testing.T) { err := json.NewDecoder(res.Body).Decode(&resp) require.NoError(t, err) require.Len(t, resp.Data, 2) - require.EqualValues(t, eth2p0.ValidatorIndex(12), resp.Data[0].Index) - require.EqualValues(t, eth2p0.ValidatorIndex(35), resp.Data[1].Index) + if resp.Data[0].Index == eth2p0.ValidatorIndex(12) { + require.EqualValues(t, eth2p0.ValidatorIndex(35), resp.Data[1].Index) + } else { + require.EqualValues(t, eth2p0.ValidatorIndex(12), resp.Data[1].Index) + } } t.Run("via query ids", func(t *testing.T) {