|
46 | 46 | clustering_ok_with_supported_required_ff/1, |
47 | 47 | activating_plugin_with_new_ff_disabled/1, |
48 | 48 | activating_plugin_with_new_ff_enabled/1, |
49 | | - enable_plugin_feature_flag_after_deactivating_plugin/1 |
| 49 | + enable_plugin_feature_flag_after_deactivating_plugin/1, |
| 50 | + restart_node_with_unknown_enabled_feature_flag/1 |
50 | 51 | ]). |
51 | 52 |
|
52 | 53 | suite() -> |
@@ -97,7 +98,8 @@ groups() -> |
97 | 98 | [ |
98 | 99 | activating_plugin_with_new_ff_disabled, |
99 | 100 | activating_plugin_with_new_ff_enabled, |
100 | | - enable_plugin_feature_flag_after_deactivating_plugin |
| 101 | + enable_plugin_feature_flag_after_deactivating_plugin, |
| 102 | + restart_node_with_unknown_enabled_feature_flag |
101 | 103 | ]} |
102 | 104 | ], |
103 | 105 |
|
@@ -1292,6 +1294,53 @@ enable_plugin_feature_flag_after_deactivating_plugin(Config) -> |
1292 | 1294 | end, |
1293 | 1295 | ok. |
1294 | 1296 |
|
| 1297 | +restart_node_with_unknown_enabled_feature_flag(Config) -> |
| 1298 | + FFSubsysOk = is_feature_flag_subsystem_available(Config), |
| 1299 | + |
| 1300 | + log_feature_flags_of_all_nodes(Config), |
| 1301 | + case FFSubsysOk of |
| 1302 | + true -> |
| 1303 | + ?assertEqual([false, false], |
| 1304 | + is_feature_flag_supported(Config, plugin_ff)), |
| 1305 | + ?assertEqual([false, false], |
| 1306 | + is_feature_flag_enabled(Config, plugin_ff)); |
| 1307 | + false -> |
| 1308 | + ok |
| 1309 | + end, |
| 1310 | + |
| 1311 | + rabbit_ct_broker_helpers:enable_plugin(Config, 0, "my_plugin"), |
| 1312 | + rabbit_ct_broker_helpers:enable_plugin(Config, 1, "my_plugin"), |
| 1313 | + rabbit_ct_broker_helpers:disable_plugin(Config, 0, "my_plugin"), |
| 1314 | + rabbit_ct_broker_helpers:disable_plugin(Config, 1, "my_plugin"), |
| 1315 | + |
| 1316 | + enable_feature_flag_on(Config, 0, plugin_ff), |
| 1317 | + case FFSubsysOk of |
| 1318 | + true -> |
| 1319 | + enable_feature_flag_on(Config, 0, plugin_ff), |
| 1320 | + ?assertEqual([true, true], |
| 1321 | + is_feature_flag_supported(Config, plugin_ff)), |
| 1322 | + ?assertEqual([true, true], |
| 1323 | + is_feature_flag_enabled(Config, plugin_ff)); |
| 1324 | + false -> |
| 1325 | + ok |
| 1326 | + end, |
| 1327 | + |
| 1328 | + rabbit_ct_broker_helpers:restart_node(Config, 0), |
| 1329 | + rabbit_ct_broker_helpers:restart_node(Config, 1), |
| 1330 | + |
| 1331 | + log_feature_flags_of_all_nodes(Config), |
| 1332 | + case FFSubsysOk of |
| 1333 | + true -> |
| 1334 | + enable_feature_flag_on(Config, 0, plugin_ff), |
| 1335 | + ?assertEqual([false, false], |
| 1336 | + is_feature_flag_supported(Config, plugin_ff)), |
| 1337 | + ?assertEqual([false, false], |
| 1338 | + is_feature_flag_enabled(Config, plugin_ff)); |
| 1339 | + false -> |
| 1340 | + ok |
| 1341 | + end, |
| 1342 | + ok. |
| 1343 | + |
1295 | 1344 | %% ------------------------------------------------------------------- |
1296 | 1345 | %% Internal helpers. |
1297 | 1346 | %% ------------------------------------------------------------------- |
|
0 commit comments