Skip to content

Commit

Permalink
fix(tests): fix port to listen to while app running, change build wor…
Browse files Browse the repository at this point in the history
…kflow step
  • Loading branch information
maugde committed Jun 18, 2024
1 parent cd88f7c commit 0ec93d2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ jobs:

- name: Build Windows Installer
if: matrix.os == 'windows-latest'
run: hatch run pyinstaller:build AntaresWebInstaller.exe
working-directory: dist/
run: hatch run pyinstaller:build

- name: Build Ubuntu Installer
if: matrix.os == 'ubuntu-20.04'
run: hatch run pyinstaller:build AntaresWebInstaller
working-directory: dist/
run: hatch run pyinstaller:build

- name: Upload binaries
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def antares_web_server_fixture(antares_web_server_path: Path) -> t.Generator[sub
# Wait for the server to be ready
timeout_time = time.time() + SERVER_TIMEOUT
while time.time() < timeout_time:
if ping("localhost", 8000, timeout=0.1):
if ping("localhost", 8080, timeout=0.1):
break
time.sleep(0.1)
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/server_mock/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Define the server configuration
HOST = "127.0.0.1"
PORT = 8000
PORT = 8080
VERSION = "2.14.0"


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_run_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ def test_server_health(antares_web_server):
Test the health endpoint of the Antares web server.
"""

res = httpx.get("http://localhost:8000/health", timeout=0.25)
res = httpx.get("http://localhost:8080/health", timeout=0.25)
assert res.status_code == 200, res.json()
assert res.json() == {"status": "available"}

0 comments on commit 0ec93d2

Please sign in to comment.