update query in the immutable delete manifest middleware

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-10-22 18:30:03 +08:00 committed by Steven Zou
parent 962bafb7ce
commit 182e557bf2
2 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,8 @@ func (dmf *delmfInterceptor) HandleRequest(req *http.Request) (err error) {
artifactQuery := &models.ArtifactQuery{ artifactQuery := &models.ArtifactQuery{
Digest: dmf.mf.Digest, Digest: dmf.mf.Digest,
Repo: dmf.mf.Repository,
PID: dmf.mf.ProjectID,
} }
var afs []*models.Artifact var afs []*models.Artifact
afs, err = dao.ListArtifacts(artifactQuery) afs, err = dao.ListArtifacts(artifactQuery)

View File

@ -73,7 +73,7 @@ class TestProjects(unittest.TestCase):
#5. Get project quota #5. Get project quota
quota = self.system.get_project_quota("project", TestProjects.project_test_quota_id, **ADMIN_CLIENT) quota = self.system.get_project_quota("project", TestProjects.project_test_quota_id, **ADMIN_CLIENT)
self.assertEqual(quota[0].used["count"], 1) self.assertEqual(quota[0].used["count"], 1)
self.assertEqual(quota[0].used["storage"], 2791709) self.assertEqual(quota[0].used["storage"], 2789174)
#6. Delete repository(RA) by user(UA); #6. Delete repository(RA) by user(UA);
self.repo.delete_repoitory(TestProjects.repo_name, **ADMIN_CLIENT) self.repo.delete_repoitory(TestProjects.repo_name, **ADMIN_CLIENT)