File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ defmodule Sequin.SinkConsumerTest do
2+ use Sequin.DataCase , async: true
3+
4+ alias Sequin.Consumers
5+ alias Sequin.Consumers.SinkConsumer
6+ alias Sequin.Factory.ConsumersFactory
7+
8+ describe "sink consumer create_changeset/2" do
9+ test "all sinks have valid factories" do
10+ for sink_type <- Consumers.SinkConsumer . types ( ) do
11+ attrs = ConsumersFactory . sink_consumer_attrs ( type: sink_type )
12+ changeset = SinkConsumer . create_changeset ( % SinkConsumer { } , attrs )
13+ errors = Sequin.Error . errors_on ( changeset )
14+ assert changeset . valid? , "Sink #{ sink_type } has invalid factory: #{ inspect ( errors ) } "
15+ end
16+ end
17+ end
18+ end
Original file line number Diff line number Diff line change @@ -191,7 +191,8 @@ defmodule Sequin.Factory.ConsumersFactory do
191191 endpoint_url: "http://127.0.0.1:7700" ,
192192 primary_key: "masterKey" ,
193193 index_name: Factory . word ( ) ,
194- api_key: Factory . word ( )
194+ api_key: Factory . word ( ) ,
195+ routing_mode: "static"
195196 } ,
196197 attrs
197198 )
You can’t perform that action at this time.
0 commit comments