Skip to content

Commit 2dbb90f

Browse files
anhanhnguyenmichaelklishin
authored andcommitted
Update test case for vhost definition
1 parent ed34acb commit 2dbb90f

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
@@ -1878,6 +1878,22 @@ defs_default_queue_type_vhost(Config, QueueType) ->
18781878

18791879
%% Create a test vhost
18801880
http_put(Config, "/vhosts/test-vhost", #{default_queue_type => QueueType}, {group, '2xx'}),
1881+
1882+
Args = #{name => <<"test-vhost">>,
1883+
metadata => #{description => <<>>,
1884+
default_queue_type => QueueType,
1885+
tags => []},
1886+
limits => []},
1887+
1888+
%% Get the definitions
1889+
Definitions = http_get(Config, "/definitions", ?OK),
1890+
1891+
%% Check if vhost definition is correct
1892+
true = lists:any(fun(I) -> test_item(Args, I) end, maps:get(vhosts, Definitions)),
1893+
1894+
%% Post the definitions back
1895+
http_post(Config, "/definitions", Definitions, {group, '2xx'}),
1896+
18811897
PermArgs = [{configure, <<".*">>}, {write, <<".*">>}, {read, <<".*">>}],
18821898
http_put(Config, "/permissions/test-vhost/guest", PermArgs, {group, '2xx'}),
18831899

0 commit comments

Comments
 (0)