Bug #11472
closedPossible to delete ContentViewVersion used by Composite Content View Components
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1182481
Description of problem:
The relation between a Composite Content View and the used ContentViewVersion is not strict. After re-publishing a ContentView and you delete the old ContentViewVersion then the list of Composite Content View components is empty.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create ContentView A
2. Publish ContentView A
3. Create CompositeContentView B
4. Add ContentView A (version 1) to CompositeContentView B
5. Publish CompositeContentView B
6. Publish ContentView A (version 2)
7. Delete ContentView A version 1
8. List Components of CompositeContentView B
Actual results:
List is empty
Expected results:
Delete of ContentView A version 1 is not allowed, not breaking the list of Components of CompositeContentView B
Additional info:
fixes #11472 - Do not allow deletion of a content view version that is part of a composite view
As part of this commit, it is combining the checks for
both the environment and composite view in to a single
'validate_destroyable'.
Note: this commit also moves a few tests in the content_view_version_test that
were not getting executed due to their placement in the test file.