Skip to content

Commit

Permalink
publish failed reproduction case
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Sep 24, 2024
1 parent 9eb32ea commit 92b1751
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/functional/auth_tests/test_database_role.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import pytest

from dbt.tests.util import run_dbt


class TestDatabaseRole:
"""
This test addresses https://github.com/dbt-labs/dbt-snowflake/issues/1151
Run this manually while investigating:
CREATE DATABASE ROLE BLOCKING_DB_ROLE;
GRANT ALL PRIVILEGES ON FUTURE TABLES IN DATABASE DBT_TEST TO DATABASE ROLE BLOCKING_DB_ROLE;
"""

@pytest.fixture(scope="class")
def models(self):
return {"my_table.sql": "{{ config(materialized='table') }} select 1 as id"}

@pytest.fixture(scope="class")
def project_config_update(self):
return {"models": {"copy_grants": True}}

def test_database_role(self, project):
run_dbt(["run"])
run_dbt(["run"])
run_dbt(["run", "--full-refresh"])

0 comments on commit 92b1751

Please sign in to comment.