Fixes #345 - User's added and enabled/disabled subscriptions migration
This MR adds a subscriptions migration (done in SDK, not in Core) and the test asserting the subscriptions are migrated and save the state (enabled/disabled). @hfiguiere told us that it's core to migrate the MV2 subs to MV3 mode, but i don't see that in fact. Here the failing branch, which relies on core doing it (plus additional output to debug what's happening).
If smth goes wrong the errors are saved in Prefs.migration_errors
and might be accessed with EWE.subscriptions.getMigrationErrors()
and cleared with EWE.subscriptions.clearMigrationErrors()
.
If migrated successfully, we keep a "subscriptions_migrated" flag in Prefs and exit early next time.
So it's covering only the 1st and 2nd items from the ticket, "Handle error if limit of static rules is exceeded? .." is probably handled (as we try-catch
in add()
), but not tested.
Integrator notes are here