|
45 | 45 | clustering_ok_with_new_ff_enabled_from_plugin_on_some_nodes/1, |
46 | 46 | clustering_ok_with_supported_required_ff/1, |
47 | 47 | activating_plugin_with_new_ff_disabled/1, |
48 | | - activating_plugin_with_new_ff_enabled/1 |
| 48 | + activating_plugin_with_new_ff_enabled/1, |
| 49 | + enable_plugin_feature_flag_after_deactivating_plugin/1 |
49 | 50 | ]). |
50 | 51 |
|
51 | 52 | suite() -> |
@@ -95,7 +96,8 @@ groups() -> |
95 | 96 | {activating_plugin, [], |
96 | 97 | [ |
97 | 98 | activating_plugin_with_new_ff_disabled, |
98 | | - activating_plugin_with_new_ff_enabled |
| 99 | + activating_plugin_with_new_ff_enabled, |
| 100 | + enable_plugin_feature_flag_after_deactivating_plugin |
99 | 101 | ]} |
100 | 102 | ], |
101 | 103 |
|
@@ -1260,6 +1262,36 @@ activating_plugin_with_new_ff_enabled(Config) -> |
1260 | 1262 | end, |
1261 | 1263 | ok. |
1262 | 1264 |
|
| 1265 | +enable_plugin_feature_flag_after_deactivating_plugin(Config) -> |
| 1266 | + FFSubsysOk = is_feature_flag_subsystem_available(Config), |
| 1267 | + |
| 1268 | + log_feature_flags_of_all_nodes(Config), |
| 1269 | + case FFSubsysOk of |
| 1270 | + true -> |
| 1271 | + ?assertEqual([false, false], |
| 1272 | + is_feature_flag_supported(Config, plugin_ff)), |
| 1273 | + ?assertEqual([false, false], |
| 1274 | + is_feature_flag_enabled(Config, plugin_ff)); |
| 1275 | + false -> |
| 1276 | + ok |
| 1277 | + end, |
| 1278 | + |
| 1279 | + rabbit_ct_broker_helpers:enable_plugin(Config, 1, "my_plugin"), |
| 1280 | + rabbit_ct_broker_helpers:disable_plugin(Config, 1, "my_plugin"), |
| 1281 | + |
| 1282 | + log_feature_flags_of_all_nodes(Config), |
| 1283 | + case FFSubsysOk of |
| 1284 | + true -> |
| 1285 | + enable_feature_flag_on(Config, 0, plugin_ff), |
| 1286 | + ?assertEqual([true, true], |
| 1287 | + is_feature_flag_supported(Config, plugin_ff)), |
| 1288 | + ?assertEqual([false, true], |
| 1289 | + is_feature_flag_enabled(Config, plugin_ff)); |
| 1290 | + false -> |
| 1291 | + ok |
| 1292 | + end, |
| 1293 | + ok. |
| 1294 | + |
1263 | 1295 | %% ------------------------------------------------------------------- |
1264 | 1296 | %% Internal helpers. |
1265 | 1297 | %% ------------------------------------------------------------------- |
|
0 commit comments