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): dataset rm endpoint supports new core API #1622

Merged
merged 2 commits into from Oct 20, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion renku/service/controllers/datasets_remove.py
Expand Up @@ -45,7 +45,7 @@ def context(self):

def renku_op(self):
"""Renku operation for the controller."""
return dataset_remove([self.ctx["name"]], commit_message=self.ctx["commit_message"])
return dataset_remove(self.ctx["name"], commit_message=self.ctx["commit_message"])

def to_response(self):
"""Execute controller flow and serialize to service response."""
Expand Down
7 changes: 7 additions & 0 deletions tests/service/views/test_dataset_views.py
Expand Up @@ -98,6 +98,13 @@ def test_remove_dataset_view(svc_client_with_repo):
assert {"name", "remote_branch"} == set(response.json["result"].keys())
assert payload["name"] == response.json["result"]["name"]

# NOTE: Ensure that dataset does not exists in this project anymore!
response = svc_client.get("/datasets.list", query_string={"project_id": project_id}, headers=headers)
assert "result" in response.json

datasets = [ds["name"] for ds in response.json["result"]["datasets"]]
assert payload["name"] not in datasets


@pytest.mark.service
@pytest.mark.integration
Expand Down