Project

Profile

Help

Story #1759 ยป rpm_rsync_test_plan.txt

bmbouter, 08/02/2016 06:07 PM

 
RPM rsync Distributor Test Plan

Use SSH Key Authentication

Summary: Create, sync, publish and rsync publish a repository. Verify that files end up in the target directory.

{
"distributor_id": "rpm_rsync_distributor",
"distributor_type_id": "rpm_rsync_distributor",
"distributor_config": {
"remote": {
"ssh_user": "57840d112d527166ac000259",
"ssh_identity_file": "/home/vagrant/openshift",
"host": "rsync-bmbouter.rhcloud.com",
"root": "/var/lib/openshift/57840d112d527166ac000259/app-root/repo/diy"
},
"predistributor_id": "yum_distributor"
}
}

{
"id": "rpm_rsync_distributor"
}

pulp-admin rpm repo delete --repo-id zoo
pulp-admin orphan remove --all
pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/rpm/
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/distributors/ < rsync_distributor_config.json
pulp-admin rpm repo sync run --repo-id zoo
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/actions/publish/ < publish_rsync.json

Verify the files are created on the remote site.

PASS from bmbouter


Do A Fast Forward Publish

Summary:

Create a repository, sync it, remove two RPMs, and publish it.
Add an rsync distributor and rsync publish all 30 RPMs.
Delete the "content" and "repos" directories from the target directory.
Publish with {"force_full": false}.
Verify that two RPMs end up in the target directory.

pulp-admin rpm repo delete --repo-id zoo
pulp-admin orphan remove --all
pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/rpm/
pulp-admin rpm repo sync run --repo-id zoo
# make sure the value for force_full is false in rsync_distributor_config.json
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/distributors/ < rsync_distributor_config.json

# Show 32 RPMs
pulp-admin rpm repo list

# Remove two RPMs, and show only 30 rpms after
pulp-admin rpm repo remove rpm --repo-id zoo --str-eq="sourcerpm=camel-0.1-1.src.rpm"
pulp-admin rpm repo remove rpm --repo-id zoo --str-eq="sourcerpm=cow-2.2-3.src.rpm"
pulp-admin rpm repo list

# Do a fresh, full publish with 30 rpms. See it only published 30
pulp-admin rpm repo publish run --repo-id zoo

### Ensure everything is deleted on the remote destination
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/actions/publish/ < publish_rsync.json
{"id": "rpm_rsync_distributor"}

!! This did not publish without me setting the force_full to true

PASS from mhrivnak
PASS from bmbouter

### Delete everything just put on the target destination
rm -rf content repos
# see that only the repodata directory and its contents remain
# sync and publish to have yum_distributor do a partial publish
# (Remember, in the previous step, two RPMs were deleted from the repo, and then it was published. As a result, the remote directory should have only 30 RPMs. When this Publish occurs, Pulp should use its fast forward logic and rsync over only two RPMs, and those two RPMs are the only two RPMs that should end up in the target directory.)
pulp-admin rpm repo sync run --repo-id zoo

http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo/actions/publish/ < publish_rsync.json
{"id": "rpm_rsync_distributor"}

!!Output only published the metadata, the actual packages themselves were not published
FAIL from mhrivnak, I see the same thing
PASS from bmbouter, all repodata was republished, the 2 expected symlinks are published and the 2 expected content being linked to is published

Do A Full Publish

Summary:

Create a repository, sync it, remove two RPMs, and publish it.
Add an rsync distributor and rsync publish all 30 RPMs.
Delete the "content" and "repos" directories from the target directory.
Publish with {"force_full": true}.
Verify that all RPMs end up in the target directory.

Use the partial test exactly as above, but use the following config for the second publish (the incremental one)

{
"id": "rpm_rsync_distributor",
"override_config": {"force_full": true}
}

# verify that on the remote destination the entire repo is created, not just the 2 rpms as done in the second publish of the partial test

PASS from bmbouter

Use content_units_only

Create, sync, publish and rsync publish a repository with {"content_units_only": true}. Verify that a "content" directory is made, and nothing else.

# Delete everything from remote repo
# Use basic rsa key based auth

{
"id": "rpm_rsync_distributor",
"override_config": {
"content_units_only": true
}
}

# Verified a 'content' directory was made and that no 'repos' directory was made
PASS bmbouter

Use skip_repodata

Create, sync, publish and rsync publish a repository with {"skip_repodata": true}. Verify that all content is published to the target directory except a "repodata" directory.

# Delete everything from remote repo
# Use basic rsa key based auth

{
"id": "rpm_rsync_distributor",
"override_config": {
"skip_repodata": true
}
}

# verified the actual content was published, and so were symlinks but the repodata was not.
PASS bmbouter

Use content_units_only And skip_repodata Together

Create, sync, publish and rsync publish a repository with {"content_units_only": true, "skip_repodata": true}. The content_units_only option should take precedence. Verify that a "content" directory is published, and nothing else.

# Delete everything from remote repo
# Use basic rsa key based auth

{
"id": "rpm_rsync_distributor",
"override_config": {
"skip_repodata": true,
"content_units_only": true
}
}

# verified the only content was published event though another option was specified
PASS bmbouter


==== Test delete ====

Summary:

Create, sync, publish, and rsync publish.
Create some extra files in the target directory. (Could one instead remove some RPMs from the repository, and re-publish?)
rsync publish with {"delete": true}.
Verify that the extra files are gone.

# Delete everything from remote repo
# Use basic rsa key based auth
# Do the normal publish

{"id": "rpm_rsync_distributor"}

# Add some extra files to the remote to simulate files which will be deleted with deleted
# mhrivnak skipped adding extra files and instead just made sure that when delete is false, old XML files stay in place, and when it is true, they get deleted
# Publish to the remote using:

{
"id": "rpm_rsync_distributor",
"override_config": {
"delete": true
}
}

!! The extra files I created are still in the directory structure after the "force-refresh" publish
PASS from mhrivnak
PASS from bmbouter

==== Test remote_units_path ====

Create, sync, publish and rsync publish with {"remote_units_path": "some/relative/path"}. Verify that content ends up in this directory, not "content/units." Pulp should create the directory if it does not exist.

Use this as the publish config

{
"id": "rpm_rsync_distributor",
"override_config": {
"remote_units_path": "foo/bar"
}
}

# verified that the expected foo/bar is created
# verified that the symlinks are correct to use this new structure

PASS bmbouter




    (1-1/1)