Part of lp.services.mailman.testing
| Class | SyncDetails | Details about the sync that just happened. |
| Function | prepare_for_sync | Prepare a sync'd directory for mlist-sync.py. |
| Function | dump_list_info | Print a bunch of useful information related to sync'ing. |
This simulates what happens in the real-world: the production Launchpad database is copied to staging, and then the Mailman data is copied to a temporary local directory on staging. It is from this temporary location that the actual staging Mailman data is sync'd.
Because of this, it's possible that a mailing list will exist in Mailman but not in Launchpad's database. We simulate this by creating fake-team in Mailman only.
Also, the Mailman data will have some incorrect hostnames that reflect production hostnames instead of staging hostnames. We simulate this by hacking those production names into the Mailman lists.
The Launchpad database will also have production hostnames in the mailing list data it knows about.
Finally, after all this hackery, we copy the current Mailman tree to a temporary location. Thus this temporary copy will look like production's Mailman database, and the sync will be more realistic.
| Returns | An object containing the details of the sync. The returned
object will have a source_dir attribute indicating the sync source
directory, and a mhonarch_path attribute indicating the path to the
fake team's MHonArc archive. The returned object will have a
cleanup() method that must be called at the end of the test. (type: SyncDetails) | |