Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(service): allow setting keywords on project creation #3665

Merged
merged 3 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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