@@ -130,67 +130,16 @@ end_per_suite(Config) ->
130130init_per_group (registry , Config ) ->
131131 logger :set_primary_config (level , debug ),
132132 rabbit_ct_helpers :run_steps (Config , []);
133- init_per_group (feature_flags_v2 , Config ) ->
134- % % @todo Remove this entirely as that FF became required in 3.12.
135- % % `feature_flags_v2' is now required and won't work in mixed-version
136- % % clusters if the other version doesn't support it.
137- case rabbit_ct_helpers :is_mixed_versions () of
138- false ->
139- rabbit_ct_helpers :set_config (
140- Config , {enable_feature_flags_v2 , true });
141- true ->
142- % % Before we run `feature_flags_v2'-related tests, we must ensure
143- % % that both umbrellas support them. Otherwise there is no point
144- % % in running them.
145- % % To determine that `feature_flags_v2' are supported, we can't
146- % % query RabbitMQ which is not started. Therefore, we check if the
147- % % source or bytecode of `rabbit_ff_controller' is present.
148- Dir1 = ? config (rabbit_srcdir , Config ),
149- File1 = filename :join ([Dir1 , " ebin" , " rabbit_ff_controller.beam" ]),
150- SupportedPrimary = filelib :is_file (File1 ),
151- SupportedSecondary =
152- case rabbit_ct_helpers :get_config (Config , rabbitmq_run_cmd ) of
153- undefined ->
154- % % make
155- Dir2 = ? config (secondary_rabbit_srcdir , Config ),
156- File2 = filename :join (
157- [Dir2 , " src" , " rabbit_ff_controller.erl" ]),
158- filelib :is_file (File2 );
159- RmqRunSecondary ->
160- % % bazel
161- Dir2 = filename :dirname (RmqRunSecondary ),
162- Beam = filename :join (
163- [Dir2 , " plugins" , " rabbit-*" ,
164- " ebin" , " rabbit_ff_controller.beam" ]),
165- case filelib :wildcard (Beam ) of
166- [_ ] -> true ;
167- [] -> false
168- end
169- end ,
170- case {SupportedPrimary , SupportedSecondary } of
171- {true , true } ->
172- rabbit_ct_helpers :set_config (
173- Config , {enable_feature_flags_v2 , true });
174- {false , true } ->
175- {skip ,
176- " Primary umbrella does not support "
177- " feature_flags_v2" };
178- {true , false } ->
179- {skip ,
180- " Secondary umbrella does not support "
181- " feature_flags_v2" }
182- end
183- end ;
184133init_per_group (enabling_on_single_node , Config ) ->
185134 Config1 = rabbit_ct_helpers :set_config (
186135 Config ,
187136 [{rmq_nodes_count , 1 }]),
188- rabbit_ct_helpers :run_setup_steps (Config1 , [fun prepare_my_plugin /1 ]);
137+ rabbit_ct_helpers :run_setup_steps (Config1 , [fun build_my_plugin /1 ]);
189138init_per_group (enabling_in_cluster , Config ) ->
190139 Config1 = rabbit_ct_helpers :set_config (
191140 Config ,
192141 [{rmq_nodes_count , 5 }]),
193- rabbit_ct_helpers :run_setup_steps (Config1 , [fun prepare_my_plugin /1 ]);
142+ rabbit_ct_helpers :run_setup_steps (Config1 , [fun build_my_plugin /1 ]);
194143init_per_group (clustering , Config ) ->
195144 Config1 = rabbit_ct_helpers :set_config (
196145 Config ,
@@ -207,14 +156,14 @@ init_per_group(clustering, Config) ->
207156 message_containers ,
208157 quorum_queue_non_voters
209158 ]}]}),
210- rabbit_ct_helpers :run_setup_steps (Config2 , [fun prepare_my_plugin /1 ]);
159+ rabbit_ct_helpers :run_setup_steps (Config2 , [fun build_my_plugin /1 ]);
211160init_per_group (activating_plugin , Config ) ->
212161 Config1 = rabbit_ct_helpers :set_config (
213162 Config ,
214163 [{rmq_nodes_count , 2 },
215164 {rmq_nodes_clustered , true },
216165 {start_rmq_with_plugins_disabled , true }]),
217- rabbit_ct_helpers :run_setup_steps (Config1 , [fun prepare_my_plugin /1 ]);
166+ rabbit_ct_helpers :run_setup_steps (Config1 , [fun build_my_plugin /1 ]);
218167init_per_group (_ , Config ) ->
219168 Config .
220169
@@ -1367,19 +1316,6 @@ restart_node_with_unknown_enabled_feature_flag(Config) ->
13671316% % Internal helpers.
13681317% % -------------------------------------------------------------------
13691318
1370- prepare_my_plugin (Config ) ->
1371- case os :getenv (" RABBITMQ_RUN" ) of
1372- false ->
1373- build_my_plugin (Config );
1374- _ ->
1375- MyPluginDir = filename :dirname (
1376- filename :dirname (
1377- code :where_is_file (" my_plugin.app" ))),
1378- PluginsDir = filename :dirname (MyPluginDir ),
1379- rabbit_ct_helpers :set_config (
1380- Config , [{rmq_plugins_dir , PluginsDir }])
1381- end .
1382-
13831319build_my_plugin (Config ) ->
13841320 DataDir = filename :join (
13851321 filename :dirname (filename :dirname (? config (data_dir , Config ))),
0 commit comments