Create a set of tests to run with every PR for the migration plugin
Migration plugin is under active development, incl. code refactors, new features.
There is a need to have tests which can run for every PR and which can give at least level of confidence that migration works as expected and new changes didn't introduce regressions.
- Pulp 3
- Use pre-prepared "snapshots" of Pulp 2 to mimic Pulp 2 existence and certain behaviour.
- Create fixtures which will contain mongodumps and corresponding tar balls of /var/lib/pulp/content (Pulp 2 content).
- Add ability to the pulp-smash to optionally use newly created fixtures at test setup time.
- Write tests (they can also be used in a more complicated setup with the real Pulp 2 running)
1. One Pulp 2 snapshot.
- Test that downloaded content is migrated properly (content is created, hardlinks are created, artifatcs are created in DB)
- Test that on_demand content is migrated properly (content is created, remote artifacts are created)
- Test that migration happened according to the Migration Plan
- Test that migrated resources are created correctly (repos, repo versions, remotes, distributions, etc)
- Test that the migrated content is consumable.
2. Multiple Pulp 2 snapshots
- Test that migrated resources are created correctly after changes in Pulp2
- Test that the migrated content is consumable after changes in Pulp 2