Skip to content

Commit

Permalink
rabbitmq_4_0_deprecations_SUITE: Add more assertions to ram node tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbbell committed Dec 18, 2024
1 parent c69e780 commit 473bf7f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions deps/rabbit/test/rabbitmq_4_0_deprecations_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ join_when_ram_node_type_is_permitted_by_default_khepri(Config) ->
[NodeA, NodeB] = rabbit_ct_broker_helpers:get_node_configs(
Config, nodename),

IsPermitted = rabbit_ct_broker_helpers:rpc(
Config, NodeA,
rabbit_deprecated_features, is_permitted,
[ram_node_type]),

ok = rabbit_control_helper:command(stop_app, NodeA),
?assertMatch(
{error, 70,
Expand All @@ -305,6 +310,12 @@ join_when_ram_node_type_is_permitted_by_default_khepri(Config) ->
[atom_to_list(NodeB)], [{"--ram", true}])),
ok = rabbit_control_helper:command(start_app, NodeA),

?assertEqual(
IsPermitted,
rabbit_ct_broker_helpers:rpc(
Config, NodeA,
rabbit_deprecated_features, is_permitted, [ram_node_type])),

?assertEqual([NodeA], get_all_nodes(Config, NodeA)),
?assertEqual([NodeB], get_all_nodes(Config, NodeB)),
?assertEqual([NodeA], get_disc_nodes(Config, NodeA)),
Expand Down Expand Up @@ -357,6 +368,11 @@ join_when_ram_node_type_is_not_permitted_from_conf_khepri(Config) ->
[NodeA, NodeB] = rabbit_ct_broker_helpers:get_node_configs(
Config, nodename),

IsPermitted = rabbit_ct_broker_helpers:rpc(
Config, NodeA,
rabbit_deprecated_features, is_permitted,
[ram_node_type]),

ok = rabbit_control_helper:command(stop_app, NodeA),
?assertMatch(
{error, 70,
Expand All @@ -366,6 +382,12 @@ join_when_ram_node_type_is_not_permitted_from_conf_khepri(Config) ->
[atom_to_list(NodeB)], [{"--ram", true}])),
ok = rabbit_control_helper:command(start_app, NodeA),

?assertEqual(
IsPermitted,
rabbit_ct_broker_helpers:rpc(
Config, NodeA,
rabbit_deprecated_features, is_permitted, [ram_node_type])),

?assertEqual([NodeA], get_all_nodes(Config, NodeA)),
?assertEqual([NodeB], get_all_nodes(Config, NodeB)),
?assertEqual([NodeA], get_disc_nodes(Config, NodeA)),
Expand Down

0 comments on commit 473bf7f

Please sign in to comment.