fix URL bug in ContainerRegistryService
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Max Erenberg 2022-06-09 09:07:12 -04:00
parent 6fae2e4115
commit 00c7d562ad
2 changed files with 4 additions and 2 deletions

View File

@ -76,7 +76,8 @@ class ContainerRegistryService:
# For some reason a 403 is returned if the project doesn't exist
return
resp.raise_for_status()
repositories = [repo['name'] for repo in resp.json()]
# Each repo name has the format project/image
repositories = [repo['name'].split('/')[1] for repo in resp.json()]
for repo in repositories:
resp = self._http_delete(f'/projects/{username}/repositories/{repo}')
resp.raise_for_status()

View File

@ -56,7 +56,8 @@ class MockHarborServer(MockHTTPServerBase):
}]}, status=403)
projects = self.projects[project_name]
return web.json_response([
{'id': i, 'name': name} for i, name in enumerate(projects)
{'id': i, 'name': project_name + '/' + name}
for i, name in enumerate(projects)
])
async def users_get_handler(self, request):