Skip to content

Commit

Permalink
fix(service): allow setting keywords on project creation (#3665)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius authored Jan 4, 2024
1 parent 12469f9 commit 9377ac4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions renku/ui/service/controllers/templates_create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def new_project(self):
data_dir=self.ctx.get("data_directory"),
ssh_supported=self.template.ssh_supported,
image_request=image,
keywords=self.ctx.get("project_keywords", []),
)

self.new_project_push(new_project_path)
Expand Down
2 changes: 2 additions & 0 deletions tests/service/views/test_templates_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def test_create_project_from_template(svc_client_templates_creation, with_inject
"content_url": "https://en.wikipedia.org/static/images/icons/wikipedia.png",
"mirror_locally": True,
}
payload["project_keywords"] = ["test", "ci"]

response = svc_client.post("/templates.create_project", data=json.dumps(payload), headers=headers)

Expand All @@ -157,6 +158,7 @@ def test_create_project_from_template(svc_client_templates_creation, with_inject
with with_injection():
project = project_context.project
assert project_context.datadir == "my-folder/"
assert project.keywords == ["test", "ci"]

expected_id = f"/projects/{payload['project_namespace']}/{stripped_name}"
assert expected_id == project.id
Expand Down

0 comments on commit 9377ac4

Please sign in to comment.