Open Bug 1892056 Opened 4 months ago Updated 4 months ago

Add a utility or helper function for `test_backup` to simplify BackupResource tests

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

People

(Reporter: kpatenio, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-device-migration])

Throughout our tests, especially within the test_backup tasks, we repeatedly use the same pattern:

  1. Instantiate a BackupResource type
  2. Create unique directories for the source path and staging path
  3. Establish mock files and/or stubs (ex. SQLite db connections)
  4. Call backup
  5. Run assertions to ensure files are correctly copied

We could make things simpler and reduce code duplication by creating a helper function or utility that does this behaviour for us in backup/tests/xpcshell/head.js.

Severity: -- → N/A
Priority: -- → P3
Whiteboard: [fidefe-device-migration]
You need to log in before you can comment on or make changes to this bug.