Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions tests/unit/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@

import keyring.backend
import pytest
from databricks.sdk import config as _sdk_config

from dbt.adapters.databricks.credentials import (
DatabricksCredentialManager,
DatabricksCredentials,
)

# databricks-sdk >=0.103 added a network probe to Config(); on older SDKs
# this symbol doesn't exist and the lazy `_ensure_config` path is unnecessary.
_REQUIRES_LAZY_CONFIG = pytest.mark.skipif(
not hasattr(_sdk_config, "get_host_metadata"),
reason="lazy _ensure_config is only required when Config() does a network probe",
)


_COMMON_KWARGS = {
"host": "yourorg.databricks.com",
"database": "andre",
Expand All @@ -28,7 +19,6 @@
}


@_REQUIRES_LAZY_CONFIG
class TestParseTimeIsOffline:
"""`dbt parse/list/compile` must stay fully offline. Building
`DatabricksCredentials` is on that path, so for every supported auth
Expand Down Expand Up @@ -65,7 +55,6 @@ def test_azure_client_secret_credentials_init_does_not_call_config(self):
mock_config.assert_not_called()


@_REQUIRES_LAZY_CONFIG
class TestEnsureConfigTriggersTheRightAuth:
"""Connect-time counterpart to TestParseTimeIsOffline: when something
actually does need the config (e.g. opening a connection), `_ensure_config`
Expand Down
Loading