Skip to content

Commit

Permalink
Update test case for vhost definition
Browse files Browse the repository at this point in the history
  • Loading branch information
anhanhnguyen authored and michaelklishin committed Jun 23, 2024
1 parent ed34acb commit 2dbb90f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deps/rabbitmq_management/test/rabbit_mgmt_http_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,22 @@ defs_default_queue_type_vhost(Config, QueueType) ->

%% Create a test vhost
http_put(Config, "/vhosts/test-vhost", #{default_queue_type => QueueType}, {group, '2xx'}),

Args = #{name => <<"test-vhost">>,
metadata => #{description => <<>>,
default_queue_type => QueueType,
tags => []},
limits => []},

%% Get the definitions
Definitions = http_get(Config, "/definitions", ?OK),

%% Check if vhost definition is correct
true = lists:any(fun(I) -> test_item(Args, I) end, maps:get(vhosts, Definitions)),

%% Post the definitions back
http_post(Config, "/definitions", Definitions, {group, '2xx'}),

PermArgs = [{configure, <<".*">>}, {write, <<".*">>}, {read, <<".*">>}],
http_put(Config, "/permissions/test-vhost/guest", PermArgs, {group, '2xx'}),

Expand Down

0 comments on commit 2dbb90f

Please sign in to comment.