Project

Profile

Help

Test #4216

closed

test_crud_content_unit should test that content units cannot be deleted manually

Added by dalley over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Version:
Platform Release:
Tags:
Plugin Template
Sprint:
Quarter:

Description

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.

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.

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.

  • Plugin Template
  • File Plugin
  • Python Plugin
  • RPM Plugin
  • Docker Plugin
  • Ansible Plugin

Tangentially, it would be good to make all tests for unsupported HTTP methods (such as [3]) check for the specific HTTP 405 error code.

[0] https://pulp.plan.io/issues/3418
[1] https://pulp.plan.io/issues/3445
[2] https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L108-L144
[3] https://github.com/pulp/plugin_template/blob/master/pulp_plugin_template/tests/functional/api/test_crud_content_unit.py#L85-L103


Related issues

Related to Pulp - Issue #3445: Remove the ability for users to delete a single content unit.CLOSED - CURRENTRELEASEdalleyActions
Actions #1

Updated by dalley over 5 years ago

  • Related to Issue #3445: Remove the ability for users to delete a single content unit. added
Actions #2

Updated by dalley over 5 years ago

Actions #3

Updated by dalley over 5 years ago

Actions #4

Updated by dalley over 5 years ago

  • Status changed from NEW to POST
  • Assignee set to dalley

Added by dalley over 5 years ago

Revision 631ffe95 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Actions #6

Updated by dalley over 5 years ago

Actions #7

Updated by dalley over 5 years ago

Added by dalley over 5 years ago

Revision 4e136cc7 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Added by dalley over 5 years ago

Revision 4322c927 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Actions #9

Updated by dalley over 5 years ago

Added by dalley over 5 years ago

Revision 1d84e96a | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Added by dalley over 5 years ago

Revision f592f249 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Added by dalley over 5 years ago

Revision f592f249 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Added by dalley over 5 years ago

Revision f592f249 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Added by dalley over 5 years ago

Revision f592f249 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Actions #10

Updated by dalley over 5 years ago

Actions #11

Updated by dalley over 5 years ago

  • Status changed from POST to CLOSED - COMPLETE

Added by dalley over 5 years ago

Revision b712be75 | View on GitHub

Simplify content unit deletion test

For a brief period Pulp would allow you to delete a content unit as long as it wasn't used by a repository version. That is no longer the case - content unit deletion should be disallowed in all circumstances. Fix the tests likewise, and test that the response is HTTP 405 'method not allowed', specifically.

re #4216 https://pulp.plan.io/issues/4216

Actions #12

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #13

Updated by bmbouter almost 5 years ago

  • Tags Plugin Template added
Actions #14

Updated by bmbouter almost 5 years ago

  • Project changed from 27 to Pulp

The plugin template Redmine project is being consolidated into the Pulp Redmine project so all issues are being moved over.

Actions #15

Updated by bmbouter almost 5 years ago

  • Sprint/Milestone set to 3.0.0

Also available in: Atom PDF