Differential Revision: https://phabricator.services.mozilla.com/D311477
End-to-End Tests for Sync
This package implements "end-to-end" integration tests for syncing various data types - two clients using a real live account and a real live sync server, exchanging data and asserting that the exchange works as intended.
Running the tests
Run the tests using cargo run.
Use cargo run -- --help to see the available options.
Adding tests
For each datatype managed by sync, there should be a suite of corresponding tests. To add some:
- In
auth.rs, add support your sync engine to theTestClientstruct. - Create a file
./src/<datatype>.rsto hold the tests;logins.rsmay provide a useful example. - Create a
test_<name>function for each scenario you want to exercise. The function should take twoTestClientinstances as arguments, and use them to drive a simulated sync between two clients. - Define a
get_test_group()function that returns your test scenarios in aTestGroupstruct. - Add your test group to the
mainfunction defined inmain.rsfor execution.