parent
dd5f7cbe6c
commit
5686c80af1
5 changed files with 23 additions and 57 deletions
|
@ -547,19 +547,6 @@ class TestSecurityScanner(unittest.TestCase):
|
|||
notification = model.notification.create_repo_notification(repo, 'vulnerability_found', 'quay_notification', {}, {'level': 0})
|
||||
self.assertFalse(VulnerabilityFoundEvent().should_perform(event_data, notification))
|
||||
|
||||
def test_garbage_collection(self):
|
||||
requests_made = set()
|
||||
|
||||
@urlmatch(netloc=r'(.*\.)?mockclairservice', path=r'/v1/layers/(.+)')
|
||||
def delete_layer(url, request):
|
||||
requests_made.add(request.method)
|
||||
|
||||
with HTTMock(delete_layer):
|
||||
# Purge a repository.
|
||||
model.repository.purge_repository('devtable', 'simple')
|
||||
|
||||
# Ensure that DELETE is called (and only DELETE) for the layers in the security scanner.
|
||||
self.assertEquals(set(['DELETE']), requests_made)
|
||||
|
||||
def test_notification_worker(self):
|
||||
pages_called = []
|
||||
|
|
Reference in a new issue