fix URL bug in ContainerRegistryService

pull/67/head
Max Erenberg 4 months ago
parent 6fae2e4115
commit 00c7d562ad
  1. 3
      ceod/model/ContainerRegistryService.py
  2. 3
      tests/MockHarborServer.py

@ -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()

@ -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):

Loading…
Cancel
Save