mirror of
https://github.com/quay/quay.git
synced 2025-07-28 20:22:05 +03:00
feat: Add auto-prune policy at repository level (PROJQUAY-6354) (#2691)
* feat: Add support for auto pruning at repository level (PROJQUAY-6354) * Add repositoryautoprunepolicy table to alembic migration script * Add repository auto-prune policy endpoints * Add UI for repository auto-pruning policies * case: apply repo auto-prune policy when no namespace policy given * case: both namespace and repo pruning policy are given * Add tests for repository autoprune endpoint * Add cypress test for repository auto-prune * Add repo auto-prune policy clean-up for repository deletion * Add repository auto pruning tables to quay db snapshot for cypress tests * Address review comments * Add more tests + fix CI + reformat files * Address review comments #2 --------- Signed-off-by: harishsurf <hgovinda@redhat.com>
This commit is contained in:
committed by
GitHub
parent
29258ae0c7
commit
98811f5397
@ -970,11 +970,11 @@ class TestDeleteNamespace(ApiTestCase):
|
||||
def test_deletenamespaces(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
# Try to first delete the user. Since they are the sole admin of three orgs, it should fail.
|
||||
# Try to first delete the user. Since they are the sole admin of five orgs, it should fail.
|
||||
with check_transitive_modifications():
|
||||
self.deleteResponse(User, expected_code=400)
|
||||
|
||||
# Delete the three orgs, checking in between.
|
||||
# Delete the five orgs, checking in between.
|
||||
with check_transitive_modifications():
|
||||
self.deleteEmptyResponse(
|
||||
Organization, params=dict(orgname=ORGANIZATION), expected_code=204
|
||||
@ -985,9 +985,14 @@ class TestDeleteNamespace(ApiTestCase):
|
||||
)
|
||||
self.deleteResponse(User, expected_code=400) # Should still fail.
|
||||
self.deleteEmptyResponse(Organization, params=dict(orgname="titi"), expected_code=204)
|
||||
self.deleteResponse(User, expected_code=400) # Should still fail.
|
||||
self.deleteEmptyResponse(
|
||||
Organization, params=dict(orgname="proxyorg"), expected_code=204
|
||||
)
|
||||
self.deleteResponse(User, expected_code=400) # Should still fail.
|
||||
self.deleteEmptyResponse(
|
||||
Organization, params=dict(orgname="testorgforautoprune"), expected_code=204
|
||||
)
|
||||
|
||||
# Add some queue items for the user.
|
||||
notification_queue.put([ADMIN_ACCESS_USER, "somerepo", "somename"], "{}")
|
||||
|
Reference in New Issue
Block a user