Skip to content

Commit 7584f8c

Browse files
Merge pull request #7108 from rabbitmq/mk-backport-ct-broker-helpers-set-vhost-limits
Backport a CT broker helper fix from #5895
2 parents ed76d18 + ca1c5ac commit 7584f8c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,15 +1450,14 @@ clear_permissions(Config, Node, Username, VHost, ActingUser) ->
14501450

14511451
set_vhost_limit(Config, Node, VHost, Limit0, Value) ->
14521452
Limit = case Limit0 of
1453-
max_connections -> <<"max-connections">>;
1454-
max_queues -> <<"max-queues">>;
1455-
Other -> rabbit_data_coercion:to_binary(Other)
1453+
max_connections -> <<"max-connections">>;
1454+
max_queues -> <<"max-queues">>;
1455+
Other -> rabbit_data_coercion:to_binary(Other)
14561456
end,
1457-
Definition = rabbit_json:encode(#{Limit => Value}),
1457+
Limits = [{Limit, Value}],
14581458
rpc(Config, Node,
1459-
rabbit_vhost_limit,
1460-
set,
1461-
[VHost, Definition, <<"ct-tests">>]).
1459+
rabbit_vhost_limit, set,
1460+
[VHost, Limits, <<"ct-tests">>]).
14621461

14631462
set_user_limits(Config, Username, Limits) ->
14641463
set_user_limits(Config, 0, Username, Limits).

0 commit comments

Comments
 (0)