Issue #2349
closedRepoview left in place even when not requested
Description
Pulp has a "repoview" feature documented here: https://pulp.plan.io/issues/189
A test for this feature is as follows:
1. Create an RPM repository, and add some content to it.
2. Publish the repository. Get /pulp/repos/{rel_url}/
, and verify that no redirects occur.
3. Publish the repository with the repoview
and generate_sqlite
options set to true. Get /pulp/repos/{rel_url}/
, and verify that a redirect to /pulp/repos/{rel_url}/repoview/index.html
occurs.
4. Repeat step 2.
Unfortunately, the final step will fail. Pulp will redirect a client's request to /pulp/repos/{rel_url}/repoview/index.html
. You can even modify the test as follows, and the redirect will still occur:
1. Create an RPM repository, and add some content to it.
2. Publish the repository. Get /pulp/repos/{rel_url}/
, and verify that no redirects occur.
3. Publish the repository with the repoview
and generate_sqlite
options set to true. Get /pulp/repos/{rel_url}/
, and verify that a redirect to /pulp/repos/{rel_url}/repoview/index.html
occurs.
4. Add more content to the repository.
5. Repeat step 2.
This behaviour seems incorrect to me. In my opinion, Pulp should provide a repoview when requested, and it should not provide a repoview when not requested.