fix: Fix failed tests (#11000)

production-scroll
nikitosing 1 month ago committed by GitHub
parent eafe7c8b3b
commit fc0c5b5315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      apps/explorer/test/explorer/migrator/sanitize_duplicated_log_index_logs_test.exs

@ -7,6 +7,7 @@ defmodule Explorer.Migrator.SanitizeDuplicatedLogIndexLogsTest do
alias Explorer.Chain.Token.Instance
alias Explorer.Migrator.{SanitizeDuplicatedLogIndexLogs, MigrationStatus}
if Application.compile_env(:explorer, :chain_type) != :celo do
describe "Sanitize duplicated log index logs" do
test "correctly identifies and updates duplicated log index logs" do
block = insert(:block)
@ -28,7 +29,8 @@ defmodule Explorer.Migrator.SanitizeDuplicatedLogIndexLogsTest do
assert MigrationStatus.get_status("sanitize_duplicated_log_index_logs") == "completed"
assert BackgroundMigrations.get_sanitize_duplicated_log_index_logs_finished() == true
updated_logs = Repo.all(Log |> where([log], log.block_number == ^block.number) |> order_by([log], asc: log.index))
updated_logs =
Repo.all(Log |> where([log], log.block_number == ^block.number) |> order_by([log], asc: log.index))
assert match?(
[
@ -106,7 +108,8 @@ defmodule Explorer.Migrator.SanitizeDuplicatedLogIndexLogsTest do
assert MigrationStatus.get_status("sanitize_duplicated_log_index_logs") == "completed"
assert BackgroundMigrations.get_sanitize_duplicated_log_index_logs_finished() == true
updated_logs = Repo.all(Log |> where([log], log.block_number == ^block.number) |> order_by([log], asc: log.index))
updated_logs =
Repo.all(Log |> where([log], log.block_number == ^block.number) |> order_by([log], asc: log.index))
assert match?(
[
@ -141,4 +144,5 @@ defmodule Explorer.Migrator.SanitizeDuplicatedLogIndexLogsTest do
assert BackgroundMigrations.get_sanitize_duplicated_log_index_logs_finished() == true
end
end
end
end

Loading…
Cancel
Save