Skip to content

Commit

Permalink
Merge pull request #7918 from novda/za/check-creating-task-with-inval…
Browse files Browse the repository at this point in the history
…id-video
  • Loading branch information
novda authored May 28, 2024
2 parents ddee4db + 04adf46 commit 49b10ba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
# They are still tested without Helm
run: |
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
kubectl cp tests/mounted_file_share/videos $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python --log-cli-level DEBUG
- name: Creating a log file from "cvat" container logs
Expand Down
Binary file not shown.
21 changes: 21 additions & 0 deletions tests/python/rest_api/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,27 @@ def test_can_create_task_with_sorting_method_natural(self):
for image_file, frame in zip(image_files, data_meta.frames):
assert image_file.name == frame.name

def test_can_create_task_with_video_without_keyframes(self):
task_spec = {
"name": f"test {self._USERNAME} to create a task with a video without keyframes",
"labels": [
{
"name": "label1",
}
],
}

task_data = {
"server_files": [osp.join("videos", "video_without_valid_keyframes.mp4")],
"image_quality": 70,
}

task_id, _ = create_task(self._USERNAME, task_spec, task_data)

with make_api_client(self._USERNAME) as api_client:
(_, response) = api_client.tasks_api.retrieve(task_id)
assert response.status == HTTPStatus.OK

@pytest.mark.parametrize("data_source", ["client_files", "server_files"])
def test_can_create_task_with_sorting_method_predefined(self, data_source):
task_spec = {
Expand Down

0 comments on commit 49b10ba

Please sign in to comment.