File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3
2-
31"""
42Test script for Databricks SQL token federation with GitHub Actions OIDC tokens.
53
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3
2-
3- """
4- Unit tests for token federation functionality in the Databricks SQL connector.
5- """
6-
71import pytest
82from unittest .mock import MagicMock , patch
93from datetime import datetime , timezone , timedelta
@@ -134,7 +128,7 @@ def mock_discover_token_endpoint(self):
134128 with patch (
135129 "databricks.sql.auth.oidc_utils.OIDCDiscoveryUtil.discover_token_endpoint"
136130 ) as mock :
137- mock .return_value = "https://databricks.com/token"
131+ mock .return_value = "https://databricks.com/oidc/v1/ token"
138132 yield mock
139133
140134 @pytest .fixture
@@ -375,7 +369,7 @@ def test_exchange_token(
375369 mock_request_post .return_value = mock_response
376370
377371 # Set the token endpoint
378- federation_provider .token_endpoint = "https://databricks.com/token"
372+ federation_provider .token_endpoint = "https://databricks.com/oidc/v1/ token"
379373
380374 # Call the method
381375 token = federation_provider ._exchange_token ("original_token" )
You can’t perform that action at this time.
0 commit comments