Closed Bug 1892105 Opened 1 month ago Closed 20 days ago

Update test_backup.py to test that a backup can be recovered from - part 1

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fidefe-device-migration])

Attachments

(2 files)

In bug 1886614, I'm adding an end-to-end test for the whole backup service to test that backups can be created and recovered from.

Since at the time of writing that test, recovery wasn't yet implemented, the test just ensures that creating a backup populates a staging directory with some files and a backup-manifest.json file.

Once we've got enough of the recovery mechanism built out, we should update the test from bug 1886614 to:

  1. Write some things to various data stores, like bookmarks, passwords, cookies, etc.
  2. Create a backup.
  3. Recover from that backup into a new profile
  4. Ensure that the items from 1 exist in the new profile
Severity: -- → N/A
Priority: -- → P3

I'm going to break this into two pieces. We've already got some implementations of recover done or almost done, and I'd rather we get a version of this test in the tree for those rather than wait for all recover methods to be implemented. So this test should cover testing the following resources:

  1. CookiesBackupResource
  2. CredentialsAndSecurityBackupResource
  3. FormHistoryBackupResource
  4. MiscDataBackupResource
  5. PlacesBackupResource
  6. PreferencesBackupResource

I'll spin out a new bug to test AddonsBackupResource and SessionStoreBackupResource.

Summary: Update test_backup.py to test that a backup can be recovered from → Update test_backup.py to test that a backup can be recovered from - part 1
Blocks: 1894004
Assignee: nobody → mconley
Blocks: 1894089

This Promise is mainly for use by Marionette tests to know when to check
data stores that might have been updated by postRecovery steps.

This patch updates test_backup.py to write some testing data into various data stores
that BackupService is backing up, create a backup, recover from that backup, and check
to see if the written data exists in the recovered profile.

This isn't exactly exhaustive - there are a number of data stores that aren't accounted
for here yet. Chiefly AddonsBackupResource and SessionStoreBackupResource (bug 1894004),
but also:

  1. FxA sign-in status
  2. Logins backups
  3. Site Security Service State
  4. ProfileAge data
  5. WebRTC device ID mappings
  6. Favicons
  7. XUL Store data
  8. Content preferences
  9. Containers preferences
  10. File handler preferences
  11. Search preferences
  12. user.js and chrome/ customizations

Still, this is a start, and certainly better than nothing. Bug 1894089 has been filed
to add more data to test the listed 12 items.

Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1cd38c5a59a1
Add a postRecoveryComplete Promise getter to BackupService. r=backup-reviewers,kpatenio
https://hg.mozilla.org/integration/autoland/rev/1e2a08de2017
Flesh out test_backup.py with some data to backup and recover. r=backup-reviewers,kpatenio
Status: NEW → RESOLVED
Closed: 20 days ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: