Skip to content

Commit f8dd308

Browse files
committed
Minor fixes
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
1 parent ed6c882 commit f8dd308

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"ms-playwright.playwright",
2424
"svelte.svelte-vscode",
2525
"bradlc.vscode-tailwindcss",
26-
"esbenp.prettier-vscode"
26+
"esbenp.prettier-vscode",
27+
"ms-python.python"
2728
],
2829
"settings": {
2930
"editor.formatOnSave": true,

python/feldera/testutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
def _get_oidc_token():
2222
"""Get OIDC token if environment is configured, otherwise return None"""
2323
try:
24-
from tests.platform.oidc_test_helper import get_oidc_test_helper
24+
from feldera.testutils_oidc import get_oidc_test_helper
2525

2626
oidc_helper = get_oidc_test_helper()
2727
if oidc_helper is not None:

python/tests/platform/TEST_AUTH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ OIDC_TEST_PASSWORD=test-password
158158

159159
- `helper.py` - Main test utilities with unified authentication support
160160
- `test_oidc_auth_simple.py` - OIDC-specific authentication tests
161-
- `oidc_test_helper.py` - OIDC token management utilities
161+
- `testutils_oidc.py` - OIDC token management utilities
162162
- All other `test_*.py` files - Platform tests that use unified authentication

python/tests/platform/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def is_master(config) -> bool:
1919

2020
def _fetch_oidc_token():
2121
"""Fetch OIDC token using Resource Owner Password Grant flow."""
22-
from .oidc_test_helper import get_oidc_test_helper
22+
from feldera.testutils_oidc import get_oidc_test_helper
2323

2424
oidc_helper = get_oidc_test_helper()
2525
if oidc_helper is None:
@@ -118,13 +118,13 @@ def oidc_token_fixture(request):
118118
token_json = base64.b64decode(env_token.encode()).decode()
119119
token_data = json.loads(token_json)
120120

121+
access_token = token_data.get("access_token")
121122
if (
122-
token_data.get("access_token")
123-
and time.time() < token_data.get("expires_at", 0) - 30
123+
access_token is None
124+
or time.time() >= token_data.get("expires_at", 0) - 30
124125
):
125-
return token_data["access_token"]
126-
else:
127126
raise RuntimeError("OIDC token expired before test execution")
127+
return access_token
128128
except Exception as e:
129129
raise RuntimeError(f"Failed to parse OIDC token from environment: {e}")
130130

python/tests/platform/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from urllib.parse import quote, quote_plus
2424

2525
from tests import FELDERA_TLS_INSECURE, API_KEY, BASE_URL, unique_pipeline_name
26-
from .oidc_test_helper import get_oidc_test_helper
26+
from feldera.testutils_oidc import get_oidc_test_helper
2727

2828
API_PREFIX = "/v0"
2929

0 commit comments

Comments
 (0)