Use rabbit_mgmt_format:args_hash to get args hash in bindings API and in tests.

args_hash changed in 3.7 to avoid incompatibilities in term_to_binary
This commit is contained in:
Daniil Fedotov 2017-06-13 15:35:34 +01:00
parent c45343ff75
commit acb7703910
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ lookup(RoutingKey, Hash, [#binding{args = Args} | Rest]) ->
end.
args_hash(Args) ->
list_to_binary(rabbit_misc:base64url(erlang:md5(term_to_binary(Args)))).
rabbit_mgmt_format:args_hash(Args).
unquote(Name) ->
list_to_binary(rabbit_http_util:unquote(Name)).

View File

@ -1348,7 +1348,7 @@ arguments_test(Config) ->
passed.
table_hash(Table) ->
rabbit_misc:base64url(erlang:md5(term_to_binary(Table))).
binary_to_list(rabbit_mgmt_format:args_hash(Table)).
arguments_table_test(Config) ->
Args = #{'upstreams' => [<<"amqp://localhost/%2f/upstream1">>,