Skip to content

Commit

Permalink
fix: update test workflow to set environment variables for test URLs …
Browse files Browse the repository at this point in the history
…and refactor conftest.py to use them
  • Loading branch information
Tiburso committed Jan 7, 2025
1 parent 45545c2 commit f85cbb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ jobs:
docker compose -f docker-compose.test.yml up -d --wait
- name: Run end-to-end tests
env:
MANAGER_TEST_URL: http://localhost:3000
BROKER_TEST_URL: amqp://user:password@localhost:5672
run: |
cd client_sdks/python
source .venv/bin/activate
uv run pytest
- name: Cleanup test environment
Expand Down
8 changes: 6 additions & 2 deletions client_sdks/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
from broker import BrokerConfig
import pytest

MANAGER_TEST_URL = "http://localhost:3000"
BROKER_TEST_URL = "amqp://user:password@localhost:5672/"
import os

MANAGER_TEST_URL = os.environ.get("MANAGER_TEST_URL", "http://localhost:3000")
BROKER_TEST_URL = os.environ.get(
"BROKER_TEST_URL", "amqp://user:password@localhost:5672/"
)

WORKER_NAME = "test_worker"

Expand Down

0 comments on commit f85cbb0

Please sign in to comment.