From f609af828b357d644f6e04fa94155d8f22e47af7 Mon Sep 17 00:00:00 2001 From: omerlavanet Date: Sun, 8 Dec 2024 15:12:35 +0200 Subject: [PATCH] fix unitests --- protocol/chainlib/jsonRPC_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/protocol/chainlib/jsonRPC_test.go b/protocol/chainlib/jsonRPC_test.go index 18e8f50bdf..bb428bd56a 100644 --- a/protocol/chainlib/jsonRPC_test.go +++ b/protocol/chainlib/jsonRPC_test.go @@ -503,9 +503,12 @@ func TestJsonRpcInternalPathsMultipleVersionsAvalanche(t *testing.T) { require.Equal(t, reqDataWithApiName.apiName, api.Name) require.Equal(t, correctPath, collection.CollectionData.InternalPath) } else { - require.Error(t, err) - require.ErrorIs(t, err, common.APINotSupportedError) - require.Nil(t, chainMessage) + if err == nil { + require.True(t, strings.Contains(chainMessage.GetApi().Name, "Default-")) + } else { + require.ErrorIs(t, err, common.APINotSupportedError) + require.Nil(t, chainMessage) + } } }) }