Skip to content

Commit 654228e

Browse files
authored
test: skip creating a store on integration tests (#857)
1 parent 53f7bfc commit 654228e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

test/integration/ae_mdw_web/controllers/stats_controller_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ defmodule Integration.AeMdwWeb.StatsControllerTest do
114114
assert %{
115115
"data" => [
116116
%{
117-
"active_auctions" => 1138,
117+
"active_auctions" => 130,
118118
"active_names" => 2634,
119119
"active_oracles" => 33,
120120
"block_reward" => 94_447_969_004_862_000_000,
121-
"contracts" => 1681,
121+
"contracts" => 1664,
122122
"dev_reward" => 11_554_240_877_138_000_000,
123123
"height" => ^height,
124124
"inactive_names" => 557_159,
@@ -380,11 +380,11 @@ defmodule Integration.AeMdwWeb.StatsControllerTest do
380380
assert %{
381381
"data" => [
382382
%{
383-
"active_auctions" => 1138,
384-
"active_names" => 2634,
383+
"active_auctions" => 130,
384+
"active_names" => 2_634,
385385
"active_oracles" => 33,
386386
"sum_block_reward" => 106_403_172_824_736_927_928_811_744,
387-
"contracts" => 1681,
387+
"contracts" => 1_664,
388388
"sum_dev_reward" => 8_453_404_352_599_072_614_268_863,
389389
"height" => ^height,
390390
"inactive_names" => 557_159,

test/integration/ae_mdw_web/controllers/util_controller_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule Integration.AeMdwWeb.UtilControllerTest do
1212
{:ok, top_kb} = :aec_chain.top_key_block()
1313
{_, _, node_vsn} = Application.started_applications() |> List.keyfind(:aecore, 0)
1414
node_height = :aec_blocks.height(top_kb)
15-
mdw_tx_index = DbUtil.last_txi(state)
15+
{:ok, mdw_tx_index} = DbUtil.last_txi(state)
1616
mdw_height = State.mem_state() |> DbUtil.synced_height()
1717

1818
conn = get(conn, "/status")

test/support/conn_case.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ defmodule AeMdwWeb.ConnCase do
3232
end
3333
end
3434

35-
setup _tags do
35+
setup tags do
3636
alias AeMdw.Db.MemStore
3737
alias AeMdw.Db.NullStore
3838

39-
{:ok, conn: ConnTest.build_conn(), store: MemStore.new(NullStore.new())}
39+
if Map.get(tags, :integration, false) do
40+
{:ok, conn: ConnTest.build_conn()}
41+
else
42+
{:ok, conn: ConnTest.build_conn(), store: MemStore.new(NullStore.new())}
43+
end
4044
end
4145
end

0 commit comments

Comments
 (0)