fix: Resolve flaky address_controller test for web

pull/10203/head
Viktor Baranov 6 months ago
parent b5780d33fc
commit d9586c233f
  1. 9
      apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs

@ -159,6 +159,11 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do
tx_hash = to_string(tx.hash)
address_hash = Address.checksum(proxy_address.hash)
{:ok, implementation_contract_address_hash} =
Chain.string_to_address_hash("0x" <> implementation_contract_address_hash_string)
checksummed_implementation_contract_address_hash = Address.checksum(implementation_contract_address_hash)
insert(:proxy_implementation,
proxy_address_hash: proxy_address.hash,
proxy_type: "eip1167",
@ -177,9 +182,9 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do
"watchlist_names" => [],
"creator_address_hash" => ^from,
"creation_tx_hash" => ^tx_hash,
"implementation_address" => "0x" <> ^implementation_contract_address_hash_string,
"implementation_address" => ^checksummed_implementation_contract_address_hash,
"implementations" => [
%{"address" => "0x" <> ^implementation_contract_address_hash_string, "name" => ^name}
%{"address" => ^checksummed_implementation_contract_address_hash, "name" => ^name}
]
} = json_response(request, 200)
end

Loading…
Cancel
Save