Skip to content

Commit

Permalink
Fix input args.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Oct 23, 2024
1 parent 60053c5 commit f585b79
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/unit/test_adapter_telemetry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from unittest import mock

import dbt.adapters.snowflake.__version__

from dbt.adapters.snowflake.impl import SnowflakeAdapter
from dbt.adapters.base.relation import AdapterTrackingRelationInfo


def test_telemetry_with_snowflake_details():
mock_model_config = mock.MagicMock()
mock_model_config._extra = mock.MagicMock()
mock_model_config._extra = {
"adapter_type": "snowflake",
"table_format": "iceberg",
}

res = SnowflakeAdapter.get_adapter_run_info(mock_model_config)

assert res.adapter_name == "snowflake"
assert res.base_adapter_version == dbt.adapters.__about__.version
assert res.adapter_version == dbt.adapters.snowflake.__version__.version
assert res.adapter_details == {
"adapter_type": "snowflake",
"table_format": "iceberg",
}

assert type(res) is AdapterTrackingRelationInfo

0 comments on commit f585b79

Please sign in to comment.