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
10 changes: 5 additions & 5 deletions .github/workflows/smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ on:
- prod

jobs:
smoke:
smoketests:
runs-on: ubuntu-latest
timeout-minutes: 120
defaults:
run:
working-directory: api-client-python
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,6 +24,9 @@ jobs:
with:
python-version: "3.11"

- name: Create virtualenv
run: uv venv

- name: Install dependencies
run: |
uv pip install -r requirements-dev.lock
Expand All @@ -45,7 +45,7 @@ jobs:
fi
echo "DEBUG=false" >> $GITHUB_ENV
echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV
echo "PYTHONPATH=${{ github.workspace }}/api-client-python/src" >> $GITHUB_ENV
echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV

- name: Run smoke tests (pytest via uv)
env:
Expand Down
7 changes: 4 additions & 3 deletions tests/smoketests/test_devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,22 @@ def test_shutdown_devbox() -> None:
assert view.status == "shutdown"


@pytest.mark.timeout(30)
@pytest.mark.timeout(90)
def test_create_and_await_running_long_set_up() -> None:
created = client.devboxes.create_and_await_running(
name=unique_name("smoketest-devbox-await-running-long-set-up"),
launch_parameters={"launch_commands": ["sleep 70"], "keep_alive_time_seconds": 30},
launch_parameters={"launch_commands": ["sleep 70"]},
polling_config=PollingConfig(interval_seconds=5.0, timeout_seconds=80),
)
assert created.status == "running"
client.devboxes.shutdown(created.id)


@pytest.mark.timeout(30)
def test_create_and_await_running_timeout() -> None:
with pytest.raises(PollingTimeout):
client.devboxes.create_and_await_running(
name=unique_name("smoketest-devbox-await-running-timeout"),
launch_parameters={"launch_commands": ["sleep 70"], "keep_alive_time_seconds": 30},
launch_parameters={"launch_commands": ["sleep 70"]},
polling_config=PollingConfig(max_attempts=1, interval_seconds=0.1),
)