Skip to content

Commit a2f6d70

Browse files
committed
Update test case for vhost definition
1 parent 7841090 commit a2f6d70

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

deps/rabbitmq_management/test/rabbit_mgmt_http_SUITE.erl

+16
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,22 @@ defs_default_queue_type_vhost(Config, QueueType) ->
18511851

18521852
%% Create a test vhost
18531853
http_put(Config, "/vhosts/test-vhost", #{default_queue_type => QueueType}, {group, '2xx'}),
1854+
1855+
Args = #{name => <<"test-vhost">>,
1856+
metadata => #{description => <<>>,
1857+
default_queue_type => QueueType,
1858+
tags => []},
1859+
limits => []},
1860+
1861+
%% Get the definitions
1862+
Definitions = http_get(Config, "/definitions", ?OK),
1863+
1864+
%% Check if vhost definition is correct
1865+
true = lists:any(fun(I) -> test_item(Args, I) end, maps:get(vhosts, Definitions)),
1866+
1867+
%% Post the definitions back
1868+
http_post(Config, "/definitions", Definitions, {group, '2xx'}),
1869+
18541870
PermArgs = [{configure, <<".*">>}, {write, <<".*">>}, {read, <<".*">>}],
18551871
http_put(Config, "/permissions/test-vhost/guest", PermArgs, {group, '2xx'}),
18561872

0 commit comments

Comments
 (0)