Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
pip install --editable ".[test,ml,medical,dev,ocv]"
pip install pytest
- name: Run Tests
run: python -m pytest e2e_tests -W ignore::DeprecationWarning
run: python -m pytest e2e_tests --reruns 3 --reruns-delay 10 -W ignore::DeprecationWarning
env:
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
E2E_ENVIRONMENT: ${{ secrets.E2E_ENVIRONMENT }}
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CLIResult:
stderr: str


SERVER_WAIT_TIME = 5
SERVER_WAIT_TIME = 10


def run_cli_command(
Expand Down
17 changes: 16 additions & 1 deletion e2e_tests/test_darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import pytest

from e2e_tests.helpers import SERVER_WAIT_TIME, assert_cli, run_cli_command
from e2e_tests.helpers import assert_cli, run_cli_command
from e2e_tests.objects import ConfigValues, E2EDataset, E2EItem
from e2e_tests.setup_tests import api_call, create_random_image

Expand Down Expand Up @@ -152,5 +152,20 @@ def test_darwin_export(local_dataset_with_annotations: E2EDataset, config_values
# if we check for release name


def test_delete(local_dataset: E2EDataset) -> None:
"""
Test deleting a dataset via the darwin cli, dataset created via fixture
"""
assert local_dataset.id is not None
assert local_dataset.name is not None
result = run_cli_command(f"darwin dataset remove {local_dataset.name}", yes=True)
assert_cli(result, 0)
# Check that the dataset is gone, if so, remove from pytest object so it doesn't get deleted again
# and cause a failure on teardown
result = run_cli_command(f"darwin dataset files {local_dataset.name}")
assert_cli(result, 1, in_stdout="Error: No dataset with")
pytest.datasets.remove(local_dataset) # type: ignore


if __name__ == "__main__":
pytest.main(["-vv", "-s", __file__])
Loading