Shovel tests: ignore nodename
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details

CI uses a different hostname
This commit is contained in:
Diana Parra Corbacho 2025-07-22 10:02:46 +02:00
parent 47510a6f93
commit e00d83a889
2 changed files with 5 additions and 15 deletions

View File

@ -117,9 +117,6 @@ amqp10_destination(Config, AckMode) ->
}}, }},
publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL), publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL),
[NodeA] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
Node = atom_to_binary(NodeA),
receive receive
{amqp10_msg, Receiver, InMsg} -> {amqp10_msg, Receiver, InMsg} ->
[<<42>>] = amqp10_msg:body(InMsg), [<<42>>] = amqp10_msg:body(InMsg),
@ -142,7 +139,7 @@ amqp10_destination(Config, AckMode) ->
#{<<"x-basic-type">> := ?UNSHOVELLED, #{<<"x-basic-type">> := ?UNSHOVELLED,
<<"x-opt-shovel-type">> := <<"static">>, <<"x-opt-shovel-type">> := <<"static">>,
<<"x-opt-shovel-name">> := <<"test_shovel">>, <<"x-opt-shovel-name">> := <<"test_shovel">>,
<<"x-opt-shovelled-by">> := Node, <<"x-opt-shovelled-by">> := _,
<<"x-opt-shovelled-timestamp">> := _}, <<"x-opt-shovelled-timestamp">> := _},
amqp10_msg:message_annotations(InMsg)), amqp10_msg:message_annotations(InMsg)),
?assertMatch(#{durable := true}, amqp10_msg:headers(InMsg)), ?assertMatch(#{durable := true}, amqp10_msg:headers(InMsg)),

View File

@ -168,12 +168,9 @@ local_destination_forward_headers_amqp10(Config) ->
Msg = #amqp_msg{props = #'P_basic'{}}, Msg = #amqp_msg{props = #'P_basic'{}},
publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL), publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL),
[NodeA] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
Node = atom_to_binary(NodeA),
receive receive
{amqp10_msg, Receiver, InMsg} -> {amqp10_msg, Receiver, InMsg} ->
?assertMatch(#{<<"x-opt-shovelled-by">> := Node, ?assertMatch(#{<<"x-opt-shovelled-by">> := _,
<<"x-opt-shovel-type">> := <<"static">>, <<"x-opt-shovel-type">> := <<"static">>,
<<"x-opt-shovel-name">> := <<"test_shovel">>}, <<"x-opt-shovel-name">> := <<"test_shovel">>},
amqp10_msg:message_annotations(InMsg)) amqp10_msg:message_annotations(InMsg))
@ -196,16 +193,12 @@ local_destination_forward_headers_amqp091(Config) ->
Msg = #amqp_msg{props = #'P_basic'{}}, Msg = #amqp_msg{props = #'P_basic'{}},
publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL), publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL),
[NodeA] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
Node = atom_to_binary(NodeA),
ExpectedHeaders = lists:sort(
[{<<"x-opt-shovelled-by">>, longstr, Node},
{<<"x-opt-shovel-type">>, longstr, <<"static">>},
{<<"x-opt-shovel-name">>, longstr, <<"test_shovel">>}]),
receive receive
{#'basic.deliver'{consumer_tag = CTag}, {#'basic.deliver'{consumer_tag = CTag},
#amqp_msg{props = #'P_basic'{headers = Headers}}} -> #amqp_msg{props = #'P_basic'{headers = Headers}}} ->
?assertMatch(ExpectedHeaders, ?assertMatch([{<<"x-opt-shovel-name">>, longstr, <<"test_shovel">>},
{<<"x-opt-shovel-type">>, longstr, <<"static">>},
{<<"x-opt-shovelled-by">>, longstr, _}],
lists:sort(Headers)) lists:sort(Headers))
after ?TIMEOUT -> throw(timeout_waiting_for_deliver1) after ?TIMEOUT -> throw(timeout_waiting_for_deliver1)
end, end,