Pulp: Issueshttps://pulp.plan.io/https://pulp.plan.io/favicon.ico2020-03-27T15:07:17ZPulp
Planio RPM Support - Test #6408 (CLOSED - DUPLICATE): Unit test for is_previous_revisionhttps://pulp.plan.io/issues/64082020-03-27T15:07:17Zfao89
<p><strong>Ticket moved to GitHub</strong>: "pulp/pulp_rpm/2239":<a href="https://github.com/pulp/pulp_rpm/issues/2239" class="external">https://github.com/pulp/pulp_rpm/issues/2239</a></p>
<hr>
<p><a href="https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/app/shared_utils.py#L35" class="external">https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/app/shared_utils.py#L35</a></p>
<p>is_previous_revision is utilized on sync optimization, we need to test if it could handle revisions in many formats (timestamp, string, None).</p>
<p>Compare revisions in many formats</p>
<pre><code class="python syntaxhl" data-language="python"><span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"3.0.0"</span><span class="p">,</span> <span class="s">"2.0.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"2.0.0"</span><span class="p">,</span> <span class="s">"3.0.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">True</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"2.0.0"</span><span class="p">,</span> <span class="s">"2.0.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">True</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="mi">1234</span><span class="p">,</span> <span class="mi">1235</span><span class="p">)</span> <span class="o">-></span> <span class="bp">True</span> <span class="c1">#timestamp
</span><span class="n">is_previous_revision</span><span class="p">(</span><span class="mi">1235</span><span class="p">,</span> <span class="mi">1234</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span> <span class="c1">#timestamp
</span><span class="n">is_previous_revision</span><span class="p">(</span><span class="mi">1235</span><span class="p">,</span> <span class="s">"2.0.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"2.0.0"</span><span class="p">,</span> <span class="mi">1235</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"3.1.0"</span><span class="p">,</span> <span class="s">"2.15.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"2.15.0"</span><span class="p">,</span> <span class="s">"3.1.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">True</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="s">"3.1.0"</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="s">"3.1.0"</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="bp">None</span><span class="p">,</span> <span class="mi">1234</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
<span class="n">is_previous_revision</span><span class="p">(</span><span class="mi">1235</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="o">-></span> <span class="bp">False</span>
</code></pre>
<p>pytest parametrize: <a href="http://doc.pytest.org/en/latest/example/parametrize.html#parametrizing-conditional-raising" class="external">http://doc.pytest.org/en/latest/example/parametrize.html#parametrizing-conditional-raising</a></p> RPM Support - Test #6313 (CLOSED - COMPLETE): Write tests to check sync optimizationhttps://pulp.plan.io/issues/63132020-03-10T01:50:20ZCodeHeeler
<p>Scenarios to test:</p>
<ol>
<li>First scenario
<ol>
<li>run sync (following our workflow docs) once,</li>
<li>there should be no optimization progress report on the task</li>
</ol>
</li>
<li>Second scenario
<ol>
<li>run sync a second time with no other changes,</li>
<li>there should be an optimization progress report now on the task</li>
</ol>
</li>
<li>Third scenario
<ol>
<li>run sync a third time adding the flag 'optimize=False',</li>
<li>there should be no optimization progress report now on the task</li>
</ol>
</li>
<li>Fourth scenario
<ol>
<li>create a new repo version,</li>
<li>run sync again (remove 'optimize=False' flag),</li>
<li>there should be no optimization progress report</li>
</ol>
</li>
<li>Fifth scenario
<ol>
<li>change remote policy to immediate,</li>
<li>run sync again,</li>
<li>there should be no optimization progress report</li>
</ol>
</li>
<li>Sixth scenario
<ol>
<li>ideally, we need a revision number change to the repomd in our fixtures (do we have a setup for this already? Is this within the scope of our automated tests)</li>
<li>run sync</li>
<li>there should be no optimization progress report now on the task</li>
</ol>
</li>
<li>Seventh scenario
<ol>
<li>run sync with no changes</li>
<li>there should be an optimization progress report now on the task</li>
</ol>
</li>
<li>Eighth scenario
<ol>
<li>run sync using the same repo, but a different remote</li>
<li>there should be no optimization progress report now on the task</li>
<li>rerun this sync</li>
<li>there should be an optimization progress report now on the task</li>
</ol>
</li>
</ol>
<p>All of these syncs should be run in succession without cleanup in between as a first time sync should always leave no optimization progress report. If for some reason you wanted to separate the tests and needed cleanup in between, every test scenario other than <a class="issue tracker-3 status-11 priority-6 priority-default closed child" title="Story: As a user, I can have Pulp attempt use auto_retry application wide using the 'unsafe_autoretry' p... (CLOSED - CURRENTRELEASE)" href="https://pulp.plan.io/issues/1">#1</a> will need to have sync run twice, once at the beginning, and once when specified after the stated changes for the test.</p> Pulp - Test #4861 (CLOSED - DUPLICATE): Verify PublishedArtifact content serve from PublicationDi...https://pulp.plan.io/issues/48612019-05-21T14:53:31Zbmbouterbmbouter@redhat.com
<p><strong>Ticket moved to GitHub</strong>: "pulp/pulpcore/1833":<a href="https://github.com/pulp/pulpcore/issues/1833" class="external">https://github.com/pulp/pulpcore/issues/1833</a></p>
<hr>
<p>The only plugin I know that uses PublishedArtifact is pulp_deb as highligted by <a class="user active" href="https://pulp.plan.io/users/13826">mdellweg</a> here: <a href="https://www.redhat.com/archives/pulp-dev/2019-May/msg00029.html" class="external">https://www.redhat.com/archives/pulp-dev/2019-May/msg00029.html</a></p>
<p>That plugin could be used to verify that the Pulp Content app is able to serve PublishedArtifact objects that are reachable by their relative paths. To test this:</p>
<p>1. Install the pulp_deb plugin<br>
2. Create a repo, a remote, and sync some content to create a repository version that has some Debian content in it<br>
3. Create a publication of that RepositoryVersion (this will create the PublishedArtifact)<br>
4. Create a Distribution that exposes that the publication created in step 3<br>
5. Fetch a PublishedArtifact by its relative_url and verify that the binary data is correctly delivered.</p> Pulp - Test #4849 (CLOSED - DUPLICATE): Verify Autodistribution works using the repository fieldhttps://pulp.plan.io/issues/48492019-05-17T19:37:09Zbmbouterbmbouter@redhat.com
<p><strong>Ticket moved to GitHub</strong>: "pulp/pulpcore/1832":<a href="https://github.com/pulp/pulpcore/issues/1832" class="external">https://github.com/pulp/pulpcore/issues/1832</a></p>
<hr>
<p>Assume you have a AnsibleDistribution whose repository_version is a RespotoryVersion with content in it. This would be created like this: <a href="https://github.com/pulp/pulp_ansible#create-a-distribution-for-a-repositoryversion" class="external">https://github.com/pulp/pulp_ansible#create-a-distribution-for-a-repositoryversion</a></p>
<p>1. Request a content unit from the repo and assert the contents are correct.<br>
2. Create a new RepositoryVersion that removes the unit and do <strong>not</strong> modify the AnsibleDistribution<br>
3. refetch the same content unit and verify it 404s</p> Pulp - Test #4848 (CLOSED - DUPLICATE): Verify RepositoryVersionDistribution serves content throu...https://pulp.plan.io/issues/48482019-05-17T19:36:15Zbmbouterbmbouter@redhat.com
<p><strong>Ticket moved to GitHub</strong>: "pulp/pulpcore/1831":<a href="https://github.com/pulp/pulpcore/issues/1831" class="external">https://github.com/pulp/pulpcore/issues/1831</a></p>
<hr>
<p>Assume you have a AnsibleDistribution whose repository_version RespotoryVersion with content in it. This would be created like this: <a href="https://github.com/pulp/pulp_ansible#create-a-distribution-for-a-repositoryversion" class="external">https://github.com/pulp/pulp_ansible#create-a-distribution-for-a-repositoryversion</a></p>
<p>1. Request a content unit from the repo and assert the contents are correct.</p> Pulp - Test #4847 (CLOSED - COMPLETE): Verify PublishedMetadata and pass_through content serve fr...https://pulp.plan.io/issues/48472019-05-17T19:32:44Zbmbouterbmbouter@redhat.com
<p>Assuming you have a FileDistribution whose publication points to a Publication with PublishedMetadata and pass_through=True as you would get from test <a href="https://pulp.plan.io/issues/4839" class="external">https://pulp.plan.io/issues/4839</a>.</p>
<p>1. Request the repo's manifest file (which is PublishedMetadata) and assert the contents are correct.<br>
2. Request a content unit from the repo (pass_through=True testing) and assert the contents are correct.</p> RPM Support - Test #4819 (CLOSED - DUPLICATE): Update modulemd copy tests, module artifacts are a...https://pulp.plan.io/issues/48192019-05-15T10:34:05Zttereshcttereshc@redhat.com
<p><strong>Ticket moved to GitHub</strong>: "pulp/pulp_rpm/2214":<a href="https://github.com/pulp/pulp_rpm/issues/2214" class="external">https://github.com/pulp/pulp_rpm/issues/2214</a></p> Pulp - Test #4466 (CLOSED - WONTFIX): The streamer needs to try all RemoteArtifact entires relate...https://pulp.plan.io/issues/44662019-02-25T15:13:57Zbherring
<p>The long term design for the streamer was to sort the entries newest to oldest. Then, try them in order and only fail when <strong>all</strong> entries have failed.</p> RPM Support - Test #4459 (CLOSED - COMPLETE): Unable to sync 3 SLES Update repositorieshttps://pulp.plan.io/issues/44592019-02-25T14:16:41Zbherring
<p>Filtering by srpm:</p>
<pre><code>pulp-admin rpm repo create --repo-id testrepo --feed file:///home/vagrant/testrepo/ --skip srpm
pulp-admin rpm repo sync run --force-full --repo-id testrepo
</code></pre>
<p>Causes the following error:</p>
<pre><code>Malformed repository: metadata is missing for some packages in filelists.xml and in other.xml
</code></pre>
<p>While syncing without the srpm filter seems to work fine.</p>
<a name="Test-Specific-Notes"></a>
<h3 >Test Specific Notes<a href="#Test-Specific-Notes" class="wiki-anchor">¶</a></h3>
<ul>
<li>came from downstream</li>
<li>create a specific fixture with SRPM duplication</li>
</ul> Pulp - Test #4360 (CLOSED - COMPLETE): Username is mutable and can be updated/changed via REST APIhttps://pulp.plan.io/issues/43602019-01-29T17:15:22Zbherring
<p>Username is mutable and can be updated/changed via REST API.<br>
Is it on purpose? Do we rely anywhere on username?</p>
<p>Suggestion: make it immutable for now</p>
<a name="Test-Information"></a>
<h2 >Test Information<a href="#Test-Information" class="wiki-anchor">¶</a></h2>
<p>There was a discussion on whether the tests for this feature should be removed from history or not.</p>
<p>A better solution would be to modify the tests to ensure that the immutable user cannot have parameters changed and new users cannot be created .</p>
<p>Update the tests here to the new functionality.</p> Pulp - Test #4216 (CLOSED - COMPLETE): test_crud_content_unit should test that content units cann...https://pulp.plan.io/issues/42162018-11-29T20:43:45Zdalleydalley@redhat.com
<p>The tests that currently exist were based off of Pulp Issue 3418 [0], which said that content units that are present in a repository version should not be able to be deleted.</p>
<p>Shortly after that issue, another issue was created [1] which removed the ability to delete content units at all. After that issue was resolved, the proper (and only) way to do so from outside of a plugin is orphan cleanup.</p>
<p>In the following plugins, the test for 3418 [2] should be removed and replaced with a simpler test for 3445 that ensures that content units cannot be deleted, and that they raise an HTTP 405 "method not allowed" exception.</p>
<ul>
<li>Plugin Template</li>
<li>File Plugin</li>
<li>Python Plugin</li>
<li>RPM Plugin</li>
<li>Docker Plugin</li>
<li>Ansible Plugin</li>
</ul>
<p>Tangentially, it would be good to make all tests for unsupported HTTP methods (such as [3]) check for the specific HTTP 405 error code.</p>
<p>[0] <a href="https://pulp.plan.io/issues/3418" class="external">https://pulp.plan.io/issues/3418</a><br>
[1] <a href="https://pulp.plan.io/issues/3445" class="external">https://pulp.plan.io/issues/3445</a><br>
[2] <a href="https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L108-L144" class="external">https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L108-L144</a><br>
[3] <a href="https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L85-L103" class="external">https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L85-L103</a></p> Pulp - Test #4179 (CLOSED - COMPLETE): Write Test applicability for modular or mixed contenthttps://pulp.plan.io/issues/41792018-11-21T23:21:20Zragbalak
<p>1) Test whether a rpm in module is applicable if appropriate<br>
Thus RPMs with versions lesser than the modules version should be applicable for new versions</p>
<p>2) Test Modules that are dependent on other modules.<br>
Modules that are dependent on another module, must be supported for applicability testing.</p>
<p>3) Test Whether both modular and non modular rpms can be tested for<br>
applicability<br>
Customer profile created with both modular/non modular rpms should be supported</p>
<p>4) Test applicability doesn't work for future RPM versions.<br>
Negative testcase if RPM version doesn't comply with the module's version.</p> Pulp - Test #4141 (CLOSED - COMPLETE): Test view content units of a specific type for a repositor...https://pulp.plan.io/issues/41412018-11-09T17:49:36Zkersom
<ul>
<li>Add content to a repository</li>
<li>Assert that the repository version is not None</li>
<li>View content units of a specific type for a repository version</li>
</ul> Pulp - Test #4112 (CLOSED - COMPLETE): Verify module information on errata search apihttps://pulp.plan.io/issues/41122018-10-31T17:29:00Zkersom
<ol>
<li>Sync a repo with the feed <a href="https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-modules" class="external">rpm-with-modules</a>.</li>
<li>Assert that the updateinfo has an errata with some modules in it.</li>
</ol> Pulp - Test #3634 (CLOSED - COMPLETE): Write functional tests for task delete and cancel codehttps://pulp.plan.io/issues/36342018-04-30T20:59:51Zamacdona@redhat.comaustin@redhat.com
<p>Tests should successfully delete tasks in final states, and should not be able to delete tasks in waiting or running states.</p>
<p>Tests should successfully cancel tasks in waiting and running states, but should not be able to cancel tasks in final states.</p>