@@ -75,6 +75,7 @@ groups() ->
75
75
unbind_bad_binding_path_segment ,
76
76
exclusive_queue ,
77
77
purge_stream ,
78
+ purge_non_existing_queue_should_return_not_found ,
78
79
pipeline ,
79
80
multiple_link_pairs ,
80
81
link_attach_order ,
@@ -773,6 +774,18 @@ purge_stream(Config) ->
773
774
{ok , #{}} = rabbitmq_amqp_client :delete_queue (LinkPair , QName ),
774
775
ok = cleanup (Init ).
775
776
777
+ purge_non_existing_queue_should_return_not_found (Config ) ->
778
+ Init = {_ , LinkPair } = init (Config ),
779
+ QName = atom_to_binary (? FUNCTION_NAME ),
780
+
781
+ {error , Resp } = rabbitmq_amqp_client :purge_queue (LinkPair , QName ),
782
+ ? assertMatch (#{subject := <<" 404" >>}, amqp10_msg :properties (Resp )),
783
+ # 'v1_0.amqp_value' {content = {utf8 , Reason }} = amqp10_msg :body (Resp ),
784
+ ? assertEqual (<<" no queue '" , QName /binary , " ' in vhost '/'" >>,
785
+ Reason ),
786
+
787
+ ok = cleanup (Init ).
788
+
776
789
queue_topology (Config ) ->
777
790
NodeNames = rabbit_ct_broker_helpers :get_node_configs (Config , nodename ),
778
791
Nodes = [N0 , N1 , N2 ] = lists :map (fun erlang :atom_to_binary /1 , NodeNames ),
0 commit comments