Skip to content

Commit 54549d7

Browse files
authored
Fix smoketest working directory (#642)
1 parent 81d97ff commit 54549d7

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/smoketests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ on:
1212
- prod
1313

1414
jobs:
15-
smoke:
15+
smoketests:
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 120
18-
defaults:
19-
run:
20-
working-directory: api-client-python
2118
steps:
2219
- name: Checkout
2320
uses: actions/checkout@v4
@@ -27,6 +24,9 @@ jobs:
2724
with:
2825
python-version: "3.11"
2926

27+
- name: Create virtualenv
28+
run: uv venv
29+
3030
- name: Install dependencies
3131
run: |
3232
uv pip install -r requirements-dev.lock
@@ -45,7 +45,7 @@ jobs:
4545
fi
4646
echo "DEBUG=false" >> $GITHUB_ENV
4747
echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV
48-
echo "PYTHONPATH=${{ github.workspace }}/api-client-python/src" >> $GITHUB_ENV
48+
echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV
4949
5050
- name: Run smoke tests (pytest via uv)
5151
env:

tests/smoketests/test_devboxes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,22 @@ def test_shutdown_devbox() -> None:
5353
assert view.status == "shutdown"
5454

5555

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

6566

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

0 commit comments

Comments
 (0)