Skip to content

Commit 581c15c

Browse files
cpsievertclaude
andcommitted
fix: ignore host in VCR matching for Databricks tests
Instead of skipping Databricks tests in VCR workflow, override the VCR config to ignore host matching. This allows tests to run while accommodating that the Databricks host varies by environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e2b6bc4 commit 581c15c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ jobs:
4444
# Bedrock uses AWS SSO which requires live credential fetching - incompatible with VCR
4545
TEST_BEDROCK: "false"
4646
TEST_SNOWFLAKE: "false"
47-
# Databricks cassettes contain real host URLs that don't match dummy host in VCR replay
48-
TEST_DATABRICKS: "false"
4947
# Portkey API was failing during cassette recording
5048
PORTKEY_API_KEY: ""
5149

tests/test_provider_databricks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
pytest.skip("Skipping Databricks tests", allow_module_level=True)
1919

2020

21+
# Override VCR config to ignore host - Databricks host varies by environment
22+
# but cassettes were recorded with a specific host
23+
@pytest.fixture(scope="module")
24+
def vcr_config():
25+
return {
26+
"match_on": ["method", "scheme", "port", "path", "body"],
27+
}
28+
29+
2130
@pytest.mark.vcr
2231
def test_openai_simple_request():
2332
chat = ChatDatabricks(

0 commit comments

Comments
 (0)