Skip to content

Commit 500f848

Browse files
Merge remote-tracking branch 'origin/devin/1751985773-firebolt-core-support' into devin/1751985773-firebolt-core-support
2 parents d29ac37 + 57926be commit 500f848

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/integration/test_core_integration.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from firebolt.client.auth import FireboltCore
33
from sqlalchemy import create_engine, text
44
from sqlalchemy.engine.base import Connection, Engine
5+
from sqlalchemy.exc import InterfaceError
56

67

78
@pytest.mark.core
@@ -46,6 +47,9 @@ def test_core_sdk_validation_with_engine_name(self, core_url: str):
4647
assert result_dict["database"] == "test_db"
4748
assert result_dict["url"] == core_url
4849
assert isinstance(result_dict["auth"], FireboltCore)
50+
with pytest.raises(InterfaceError) as exc_info:
51+
engine.connect().execute(text("SELECT 1"))
52+
assert "Parameters 'engine_name' are not compatible" in str(exc_info.value)
4953

5054
def test_core_sdk_validation_with_account_name(self, core_url: str):
5155
"""Test that SDK handles account_name parameter for Core connections."""
@@ -60,6 +64,9 @@ def test_core_sdk_validation_with_account_name(self, core_url: str):
6064
assert result_dict["database"] == "test_db"
6165
assert result_dict["url"] == core_url
6266
assert isinstance(result_dict["auth"], FireboltCore)
67+
with pytest.raises(InterfaceError) as exc_info:
68+
engine.connect().execute(text("SELECT 1"))
69+
assert "Parameters 'account_name' are not compatible" in str(exc_info.value)
6370

6471
def test_core_sdk_validation_with_invalid_url(self, core_url: str):
6572
"""Test that SDK handles invalid URL parameter for Core connections."""
@@ -71,3 +78,6 @@ def test_core_sdk_validation_with_invalid_url(self, core_url: str):
7178
assert result_dict["url"] == "invalid://localhost:9999"
7279
assert result_dict["database"] == "test_db"
7380
assert isinstance(result_dict["auth"], FireboltCore)
81+
with pytest.raises(InterfaceError) as exc_info:
82+
engine.connect().execute(text("SELECT 1"))
83+
assert "Invalid protocol" in str(exc_info.value)

0 commit comments

Comments
 (0)