mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 07:07:42 +01:00
Merge pull request #9529 from wy65701436/fix-repo-delete
update query in the immutable delete manifest middleware
This commit is contained in:
commit
70bca1251d
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user