diff --git a/test/spec/runners/ssz_static.ex b/test/spec/runners/ssz_static.ex index 193f6388b..ceff8ec75 100644 --- a/test/spec/runners/ssz_static.ex +++ b/test/spec/runners/ssz_static.ex @@ -5,6 +5,14 @@ defmodule SszStaticTestRunner do alias LambdaEthereumConsensus.SszEx alias LambdaEthereumConsensus.Utils.Diff alias Ssz + alias Types.BeaconBlock + alias Types.BeaconBlockBody + alias Types.BeaconState + alias Types.ExecutionPayload + alias Types.ExecutionPayloadHeader + alias Types.SignedBeaconBlock + + use HardForkAliasInjection use ExUnit.CaseTemplate use TestRunner @@ -60,6 +68,15 @@ defmodule SszStaticTestRunner do "SyncCommitteeMessage" ] + @type_map %{ + "BeaconBlock" => BeaconBlock, + "BeaconBlockBody" => BeaconBlockBody, + "BeaconState" => BeaconState, + "ExecutionPayload" => ExecutionPayload, + "ExecutionPayloadHeader" => ExecutionPayloadHeader, + "SignedBeaconBlock" => SignedBeaconBlock + } + @impl TestRunner def skip?(%SpecTestCase{fork: "capella", handler: handler}) do Enum.member?(@disabled, handler) @@ -67,8 +84,7 @@ defmodule SszStaticTestRunner do def skip?(%SpecTestCase{fork: "deneb", handler: handler}) do # TODO: fix types - # Enum.member?(@disabled, handler) - true + Enum.member?(@disabled, handler) end def skip?(_), do: true @@ -115,6 +131,6 @@ defmodule SszStaticTestRunner do end defp parse_type(%SpecTestCase{handler: handler}) do - Module.concat(Types, handler) + Map.get(@type_map, handler, Module.concat(Types, handler)) end end diff --git a/test/spec/runners/sync.ex b/test/spec/runners/sync.ex index 39f2060d8..f27370d74 100644 --- a/test/spec/runners/sync.ex +++ b/test/spec/runners/sync.ex @@ -18,7 +18,7 @@ defmodule SyncTestRunner do Enum.member?(@disabled_cases, testcase.case) end - def skip?(%SpecTestCase{fork: "deneb"} = testcase) do + def skip?(%SpecTestCase{fork: "deneb"}) do # TODO: update `EngineApiMock` to support the new `new_payload/3` function, # and the runner to load the block's blobs if on deneb true