Skip to content

Commit

Permalink
data writer test mock fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ijabbott committed Sep 21, 2023
1 parent ef8b433 commit dac7902
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/forklift/test/unit/forklift/data_writer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ defmodule Forklift.DataWriterTest do
allow(Forklift.Jobs.DataMigration.compact(dataset, ingestion_id, extract_start), return: {:ok, dataset.id})
allow(Brook.Event.send(any(), event_log_published(), :forklift, any()), return: :ok)
allow(Brook.Event.send(any(), data_ingest_end(), :forklift, any()), return: :ok)
allow(Redix.command!(:redix, ["GET", ingestion_id]), return: Integer.to_string(1))
allow(Brook.Event.send(any(), ingestion_complete(), :forklift, any()), return: :ok)

stub(MockTable, :write, fn _data, _params ->
:ok
Expand Down Expand Up @@ -140,6 +142,8 @@ defmodule Forklift.DataWriterTest do

allow(Forklift.Jobs.DataMigration.compact(dataset, ingestion_id, extract_start), return: {:ok, dataset.id})
allow(Brook.Event.send(any(), data_ingest_end(), :forklift, dataset), return: :ok)
allow(Redix.command!(:redix, ["GET", ingestion_id]), return: Integer.to_string(1))
allow(Brook.Event.send(any(), ingestion_complete(), :forklift, any()), return: :ok)

stub(MockTable, :write, fn _data, _params ->
:ok
Expand Down Expand Up @@ -286,6 +290,8 @@ defmodule Forklift.DataWriterTest do

allow(Brook.Event.send(any(), event_log_published(), :forklift, any()), return: :ok)
allow(Forklift.Jobs.DataMigration.compact(dataset, ingestion_id, extract_start), return: {:ok, dataset.id})
allow(Redix.command!(:redix, ["GET", ingestion_id]), return: Integer.to_string(1))
allow(Brook.Event.send(any(), ingestion_complete(), :forklift, any()), return: :ok)

stub(MockTable, :write, fn _data, _params ->
:ok
Expand Down

0 comments on commit dac7902

Please sign in to comment.