pulp_2_tests.tests.rpm.api_v2.test_copy¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_copy
Test cases that copy content units.
-
class
pulp_2_tests.tests.rpm.api_v2.test_copy.
CopyConservativeTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test
recursive
andrecursive_conservative
flags during copy.RPM packages used in this test case:
chimpanzee ├── squirrel │ ├── camel │ └── fox └── walrus
chimpanzee has dependencies: squirrel and walrus RPM packages. squirrel has dependencies: camel and fox RPM packages.
walrus package has 2 different versions:
0.71
and5.21
.This test targets the following issues:
-
copy_units
(recursive, recursive_conservative, old_dependency)¶ Copy units using
recursive
andrecursive_conservative
.
-
pytestmark
= [Mark(name='recursive_conservative', args=(), kwargs={})]¶
-
classmethod
setUpClass
()¶ Create class-wide variables.
-
test_norecursive_conservative_dependency
()¶ Non-recursive, conservative, with old dependency.
Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as False,recursive_conservative
as True, and an older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units is equal to
5
, and the walrus package version is equal to0.71
.
- Copy
-
test_norecursive_noconservative_nodependency
()¶ Non-recursive, non-conservative, and no old dependency.
Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as False,recursive_conservative
as False, and no older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units copied is equal to
1
.
- Copy
-
test_recursive_conservative_dependency
()¶ Recursive, conservative and with old dependency.
Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as True,recursive_conservative
as True, and an older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units is equal to
5
and the walrus package version is equal to0.71
.
- Copy
-
test_recursive_conservative_nodependency
()¶ Recursive, conservative, and no old dependency.
Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as True,recursive_conservative
as True, and no older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units copied is equal to
5
, and the walrus package version is equal to5.21
.
- Copy
-
test_recursive_noconservative_dependency
()¶ Recursive, non-conservative, and
walrus-0.71
on B.Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as True,recursive_conservative
as False, and an older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units copied is equal to
6
, and the walrus package version is equal to both5.21
and0.71
.
Additional permutation added as
--recursive
should ensure thelatest
version of the RPM is also copied.- Copy
-
test_recursive_noconservative_nodependency
()¶ Recursive, non-conservative, and no old dependency.
Do the following:
- Copy
chimpanzee
RPM package from repository A to B using:recursive
as True,recursive_conservative
as False, and no older version of walrus package is present on the repo B before the copy. - Assert that total number of RPM of units copied is equal to
5
, and the walrus package version is equal to5.21
.
- Copy
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_copy.
CopyErrataRecursiveTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test that recursive copy of erratas copies RPM packages.
-
pytestmark
= [Mark(name='recursive_conservative', args=(), kwargs={})]¶
-
test_all
()¶ Test that recursive copy of erratas copies RPM packages.
This test targets the following issues:
Do the following:
- Create and sync a repository with errata, and RPM packages.
- Create second repository.
- Copy units from from first repository to second repository
using
recursive
as true, and filtertype_id
aserratum
. - Assert that RPM packages were copied.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_copy.
CopyYumMetadataFileTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test the copy of metadata units between repos.
-
pytestmark
= [Mark(name='recursive_conservative', args=(), kwargs={})]¶
-
test_all
()¶ Test whether metadata copied between repos are independent.
This test targets the following issues:
Do the following:
- Create and sync a repository containing
yum_repo_metadata_file
. - Create another repo and copy yum metadata from first repo to second repo.
- Publish repo 2.
- Remove the metadata units from the first repo. Delete orphan packages.
- Publish repo 2 again and check whether the metadata is present in the second repo still.
- Create and sync a repository containing
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_copy.
MtimeTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test whether copied files retain their original mtime.
-
test_all
()¶ Test whether copied files retain their original mtime.
This test targets the following issues:
Do the following:
- Create, sync and publish a repository, with
generate_sqlite
set to true. - Get the
mtime
of the sqlite files. - Upload an RPM package into the repository, and sync the repository.
- Get the
mtime
of the sqlite files again. Verify that the mtimes are the same.
- Create, sync and publish a repository, with
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_copy.
MultipleSourceRepositoriesRecursiveCopyTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test multiple source repositories recursive copy.
Repository 1 is a modular repository. There are 2 RPM dependencies missing from repository 1.
stork
andshark
RPMS.Repository 2 is non-modular repository and has the RPMS
stork
andshark
missing from repository 1.[walrus-0.71] - Module - repository 1 ├── walrus - RPM - repository 1
- └── whale - RPM present on repository 1
- ├── shark - RPM present on repository 2 └── stork - RPM present on repository 2
This test targets the following issues:
-
create_sync_repo
(feed)¶ Create and sync a repository given a feed.
-
pytestmark
= [Mark(name='recursive_conservative', args=(), kwargs={})]¶
-
classmethod
setUpClass
()¶ Create class-wide variables.
-
test_additional_repos_copy_one_destination
()¶ Multiple source repositories recursive copy - one repo destination.
- Copy
walrus - 0.71
module to repository 3, and all the dependencies RPMS should be solved and copied as well.
- Copy
-
test_additional_repos_copy_two_destinations
()¶ Multiple source repositories recursive copy - two repos destination.
- Copy
walrus - 0.71
module to repository 3 and the dependencies present on the repository 1 will be copied as well. The other dependencies present on the repository 2,shark
andstork
will be copied to the repository 4.
- Copy
-
test_additional_repos_errata
()¶ Copy errata using additional repos as source.
Copy errata
RHEA-2012:0059
from repository 1 to repository 3. Repository 1 does not have the packagekangaroo-0.3-1.noarch.rpm
required by the errata. This package is present on the repository 2. Pulp should copy the errata and solve the dependency chain for repository 3.