Project

Profile

Help

Test #5508

closed

Create a set of tests to run with every PR for the migration plugin

Added by ttereshc about 5 years ago. Updated over 3 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Platform Release:
Tags:
Sprint:
Quarter:

Description

Motivation

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.

Proposal

Setup:
- Pulp 3
- MongoDB

Idea:
- Use pre-prepared "snapshots" of Pulp 2 to mimic Pulp 2 existence and certain behaviour.

Deliverables:
- 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)

Tests:
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


Related issues

Related to Migration Plugin - Test #5194: [Epic] Test migration from Pulp 2 to Pulp 3CLOSED - COMPLETEActions

Also available in: Atom PDF