New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test whether Pulp can create and publish new repo copied from another repo with older package #311
Comments
Pulp Smash will never, ever have the ability to set up a VM. This test can already be implemented in Pulp Smash, including installing a package on a client. |
Can you update the name of this issue, please? When browsing through the list of issues, it'd be nice to see something like "Test whether Pulp can do foo," instead of "this issue is a follow up to another issue." |
@Ichimonji10 one follow-up question with the pulp-agent. I think this test will refer two servers only: |
AFAIK, Pulp doesn't have any way of issuing commands to clients. My assumption is that the Pulp Smash system would execute commands on
Yes, but that's purely coincidental. Pulp Smash can talk to other systems, and the only reason it hasn't happened yet is that nobody's made it happen. |
AFAIK, so far we have tests that involves Pulp components either on the same machine or in multiple (even though the later is not running at the moment). We also need ability to have machines consuming Pulp content which we can call as being clients and so far there is no machinery in place for that. We can take advantage of the Pulp Smash settings and maybe expect some The first approach the responsibility to provide some clients is on the person which is running Smash and on the second approach the responsibility is to Smash create its own VMs, but the person which is running need to provide the system to get the machines provisioned. |
I think I'm wrong about this. From the Pulp Installation docs:
|
@Ichimonji10 I am a little confused about the issue. Pulp consumer can
And the initial test described is doable. Let me try to write it up. |
In my opinion, we should keep VM-management logic out of Pulp Smash. Right now, Pulp Smash has a pretty well defined interface. Users can tell Pulp Smash what system(s) are available via (by default) a
Now, I totally agree that it'd be nice to have multi-machine testing, where the environment is programmatically managed. So - how can we do that and still integrate nicely with Pulp Smash? Well - use the |
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest2 pulp_smash.tests.rpm.cli .test_copy_publish.CopyAndPublishTwoVersionsRepoTestCase .. ---------------------------------------------------------------------- Ran 2 tests in 18.426s OK ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest2 pulp_smash.tests.rpm.cli .test_copy_publish.CopyAndPublishTwoVersionsRepoTestCase .. ---------------------------------------------------------------------- Ran 2 tests in 18.426s OK ```
Expanding the initial test case. Note: The pulp-client can be the server itself. On a pulp-server
Option 1
Option2
|
Hi folks, thank you all for your notes on this issue. I have updated the commit announcement fyi. Btw, the test case that I have designed will install the RPM packages on the same pulp server, which creates repos, copies RPMs and then publishes the repository to itself. In that case, as a workaround, I don't need extra vms or installing consumers; while it can still verify the publishing. Please let me know if this design would work as issue automation. Thanks. |
Agreed. It is better to leave the vm management outside the test framework. That will also match to the ssh access management which will be external as well, for example: A tool can create the VM, update the ssh config and Pulp Smash settings and finally start the tests. We need just to define what will be the entry names expected to be the clients (cleanup will be needed because more than one test may need a client and if there is at least one they will run). |
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units ..s.. ---------------------------------------------------------------------- Ran 5 tests in 28.270s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units ..s.. ---------------------------------------------------------------------- Ran 5 tests in 28.270s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units .Fs.. ====================================================================== FAIL: test_02_copy_newer_publish (pulp_smash.tests.rpm.cli .test_copy_units.CopyAndPublishTwoVersionsRepoTestCase) Copy a RPM with newer version into repo2 and publish repo2. ---------------------------------------------------------------------- Traceback (most recent call last): File "pulp_smash/tests/rpm/cli/test_copy_units.py", line 367, in test_02_copy_newer_publish self.assertNotIn('Nothing to do.', completed_proc.stdout.splitlines()) AssertionError: u'Nothing to do.' unexpectedly found in [u'Last metadata expiration check: 0:00:06 ago on Sat Jun 25 17:20:31 2016.', u'Dependencies resolved.', u'Nothing to do.', u'Complete!'] ---------------------------------------------------------------------- Ran 5 tests in 42.823s FAILED (failures=1, skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create repo1 and sync from upstream. 2. find an RPM that has two different versions in the repo. 3. create a new repo2, and copy the older of the rpm version into it. 4. setup that repo2 on a host, and install the packages. 5. copy a newer version into the repo2 and re-publish 6. yum update on the client, and see what happens. Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units .Fs.. ====================================================================== FAIL: test_02_copy_newer_publish (pulp_smash.tests.rpm.cli .test_copy_units.CopyAndPublishTwoVersionsRepoTestCase) Copy a RPM with newer version into repo2 and publish repo2. ---------------------------------------------------------------------- Traceback (most recent call last): File "pulp_smash/tests/rpm/cli/test_copy_units.py", line 367, in test_02_copy_newer_publish self.assertNotIn('Nothing to do.', completed_proc.stdout.splitlines()) AssertionError: u'Nothing to do.' unexpectedly found in [u'Last metadata expiration check: 0:00:06 ago on Sat Jun 25 17:20:31 2016.', u'Dependencies resolved.', u'Nothing to do.', u'Complete!'] ---------------------------------------------------------------------- Ran 5 tests in 42.823s FAILED (failures=1, skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units .Fs.. ====================================================================== FAIL: test_02_copy_newer_publish (pulp_smash.tests.rpm.cli.test_copy_units. CopyAndPublishTwoVersionsRepoTestCase) Copy a RPM with newer version into repo2 and publish repo2. ---------------------------------------------------------------------- Traceback (most recent call last): File "pulp_smash/tests/rpm/cli/test_copy_units.py", line 341, in test_02_copy_newer_publish self.assertNotIn('Nothing to do.', completed_proc.stdout.splitlines()) AssertionError: u'Nothing to do.' unexpectedly found in [u'Last metadata expiration check: 0:00:06 ago on Tue Jun 28 20:42:28 2016.', u'Dependencies resolved.', u'Nothing to do.', u'Complete!'] ---------------------------------------------------------------------- Ran 5 tests in 44.943s FAILED (failures=1, skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units .Fs.. ====================================================================== FAIL: test_02_copy_newer_publish (pulp_smash.tests.rpm.cli.test_copy_units. CopyAndPublishTwoVersionsRepoTestCase) Copy a RPM with newer version into repo2 and publish repo2. ---------------------------------------------------------------------- Traceback (most recent call last): File "pulp_smash/tests/rpm/cli/test_copy_units.py", line 341, in test_02_copy_newer_publish self.assertNotIn('Nothing to do.', completed_proc.stdout.splitlines()) AssertionError: u'Nothing to do.' unexpectedly found in [u'Last metadata expiration check: 0:00:06 ago on Tue Jun 28 20:42:28 2016.', u'Dependencies resolved.', u'Nothing to do.', u'Complete!'] ---------------------------------------------------------------------- Ran 5 tests in 44.943s FAILED (failures=1, skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units.CopyAndPublishTwoVersionsRepoTestCase .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units.CopyAndPublishTwoVersionsRepoTestCase .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
PR is merged. This issue can be closed. |
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units.CopyAndPublishTwoVersionsRepoTestCase .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
This commit fixes the issue: pulp#311. The test steps are as following: 1. create and sync repo1 from upstream. 2. find an RPM that has two different versions in the repo1 (walrus). 3. create a new repo2, and copy the older of the rpm version (e.g., walrus-0.71) into it. 4. Also install all dependency packages of the walrus RPM (whale, shark, stork). 5. setup that repo2 on the same host of Pulp server, and install the packages: `sudo yum-config-manager --add-repo {url_of_repo2_after_publish}` `sudo yum install --nogpgcheck walrus`. (The repo2 will be automatically enabled after publishing in this case.) 6. copy a newer version into the repo2 and re-publish 7. yum update on the client (`sudo yum update walrus`). Test Output: ``` [vagrant@dev pulp-smash]$ python -m unittest pulp_smash.tests.rpm.cli.test_copy_units.CopyAndPublishTwoVersionsRepoTestCase .s ---------------------------------------------------------------------- Ran 2 tests in 69.174s OK (skipped=1) ```
This is a follow-up issue after https://pulp.plan.io/issues/1684#change-10578 and Pulp-Smash Issue #190.
As @mhrivnak has pointed out thru his comments as the 5th note, a new test case will be setup as following:
The text was updated successfully, but these errors were encountered: