@@ -27,7 +27,8 @@ groups() ->
2727 [
2828 {tests , [parallel ], [
2929 parse_amqp091 ,
30- parse_amqp10_mixed
30+ parse_amqp10_mixed ,
31+ parse_local
3132 ]}
3233 ].
3334
@@ -53,7 +54,7 @@ end_per_testcase(_Testcase, Config) -> Config.
5354
5455
5556% % -------------------------------------------------------------------
56- % % Testcases.
57+ % % Test cases
5758% % -------------------------------------------------------------------
5859
5960parse_amqp091 (_Config ) ->
@@ -128,3 +129,46 @@ parse_amqp10_mixed(_Config) ->
128129 add_forward_headers := true }}},
129130 rabbit_shovel_config :parse (my_shovel , In )),
130131 ok .
132+
133+ parse_local (_Config ) ->
134+ Amqp091Src = {source , [
135+ {protocol , local },
136+ {uris , [" ampq://myhost:5672/vhost" ]},
137+ {declarations , []},
138+ {queue , <<" the-queue" >>},
139+ {delete_after , never },
140+ {prefetch_count , 10 }]},
141+ Amqp091Dst = {destination , [
142+ {protocol , local },
143+ {uris , [" ampq://myhost:5672" ]},
144+ {declarations , []},
145+ {publish_properties , [{delivery_mode , 1 }]},
146+ {publish_fields , []},
147+ {add_forward_headers , true }]},
148+ In = [Amqp091Src ,
149+ Amqp091Dst ,
150+ {ack_mode , on_confirm },
151+ {reconnect_delay , 2 }],
152+
153+ ? assertMatch (
154+ {ok , #{name := my_shovel ,
155+ ack_mode := on_confirm ,
156+ reconnect_delay := 2 ,
157+ shovel_type := static ,
158+ dest := #{
159+ module := rabbit_local_shovel ,
160+ uris := [" ampq://myhost:5672" ],
161+ exchange := none ,
162+ routing_key := none ,
163+ resource_decl := _DDecl ,
164+ add_timestamp_header := false ,
165+ add_forward_headers := true },
166+ source := #{
167+ module := rabbit_local_shovel ,
168+ uris := [" ampq://myhost:5672/vhost" ],
169+ queue := <<" the-queue" >>,
170+ consumer_args := [],
171+ delete_after := never ,
172+ resource_decl := _SDecl }}},
173+ rabbit_shovel_config :parse (my_shovel , In )),
174+ ok .
0 commit comments