From e00d83a889e377b5991d1c24d1d9aaee9fbb3a5f Mon Sep 17 00:00:00 2001 From: Diana Parra Corbacho Date: Tue, 22 Jul 2025 10:02:46 +0200 Subject: [PATCH] Shovel tests: ignore nodename CI uses a different hostname --- deps/rabbitmq_shovel/test/amqp10_SUITE.erl | 5 +---- deps/rabbitmq_shovel/test/local_SUITE.erl | 15 ++++----------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/deps/rabbitmq_shovel/test/amqp10_SUITE.erl b/deps/rabbitmq_shovel/test/amqp10_SUITE.erl index 10712eae75..bb8a118a8f 100644 --- a/deps/rabbitmq_shovel/test/amqp10_SUITE.erl +++ b/deps/rabbitmq_shovel/test/amqp10_SUITE.erl @@ -117,9 +117,6 @@ amqp10_destination(Config, AckMode) -> }}, publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL), - [NodeA] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename), - Node = atom_to_binary(NodeA), - receive {amqp10_msg, Receiver, InMsg} -> [<<42>>] = amqp10_msg:body(InMsg), @@ -142,7 +139,7 @@ amqp10_destination(Config, AckMode) -> #{<<"x-basic-type">> := ?UNSHOVELLED, <<"x-opt-shovel-type">> := <<"static">>, <<"x-opt-shovel-name">> := <<"test_shovel">>, - <<"x-opt-shovelled-by">> := Node, + <<"x-opt-shovelled-by">> := _, <<"x-opt-shovelled-timestamp">> := _}, amqp10_msg:message_annotations(InMsg)), ?assertMatch(#{durable := true}, amqp10_msg:headers(InMsg)), diff --git a/deps/rabbitmq_shovel/test/local_SUITE.erl b/deps/rabbitmq_shovel/test/local_SUITE.erl index 41aacca165..f12c53f835 100644 --- a/deps/rabbitmq_shovel/test/local_SUITE.erl +++ b/deps/rabbitmq_shovel/test/local_SUITE.erl @@ -168,12 +168,9 @@ local_destination_forward_headers_amqp10(Config) -> Msg = #amqp_msg{props = #'P_basic'{}}, publish(Chan, Msg, ?EXCHANGE, ?TO_SHOVEL), - [NodeA] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename), - Node = atom_to_binary(NodeA), - receive {amqp10_msg, Receiver, InMsg} -> - ?assertMatch(#{<<"x-opt-shovelled-by">> := Node, + ?assertMatch(#{<<"x-opt-shovelled-by">> := _, <<"x-opt-shovel-type">> := <<"static">>, <<"x-opt-shovel-name">> := <<"test_shovel">>}, amqp10_msg:message_annotations(InMsg)) @@ -196,16 +193,12 @@ local_destination_forward_headers_amqp091(Config) -> Msg = #amqp_msg{props = #'P_basic'{}}, 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 {#'basic.deliver'{consumer_tag = CTag}, #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)) after ?TIMEOUT -> throw(timeout_waiting_for_deliver1) end,