Skip to content

Commit

Permalink
skip grant tests
Browse files Browse the repository at this point in the history
only supported by EE/DC
current pipeline is OSS only
  • Loading branch information
bcmeireles committed Jan 23, 2025
1 parent e38fde7 commit 0a01f8a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/functional/adapter/grants/base_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from tests.utils.util import BUCKET


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class BaseGrantsDremio(BaseGrants):
# This is overridden to change insert privilege to alter
def privilege_grantee_name_overrides(self):
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/adapter/grants/test_incremental_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from dbt.tests.util import (
run_dbt_and_capture,
get_manifest,
Expand All @@ -27,6 +29,7 @@
)


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestIncrementalGrantsDremio(BaseGrantsDremio, BaseIncrementalGrants):
# Define this here to use our modified version of relation_from_name
def get_grants_on_relation(self, project, relation_name):
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/adapter/grants/test_invalid_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from dbt.tests.adapter.grants.test_invalid_grants import BaseInvalidGrants
from tests.functional.adapter.grants.base_grants import BaseGrantsDremio
from tests.utils.util import relation_from_name
from dbt.tests.util import get_connection


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestInvalidGrantsDremio(BaseGrantsDremio, BaseInvalidGrants):
def grantee_does_not_exist_error(self):
return "Grant on catalog entity failed. User invalid_user does not exist."
Expand Down
4 changes: 4 additions & 0 deletions tests/functional/adapter/grants/test_model_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from dbt.tests.adapter.grants.test_model_grants import (
BaseModelGrants,
user2_model_schema_yml,
Expand All @@ -30,6 +32,7 @@
from tests.utils.util import relation_from_name


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestViewGrantsDremio(BaseGrantsDremio, BaseModelGrants):

# Overridden to only include view materialization
Expand Down Expand Up @@ -59,6 +62,7 @@ def test_view_table_grants(self, project, get_test_users):
self.assert_expected_grants_match_actual(project, "my_model", expected)


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestTableGrantsDremio(BaseGrantsDremio, BaseModelGrants):
# Need to override this to make sure it uses our modified version of relation_from_name
# This isn't needed for views, as dbt-core's version defaults to database/schema path
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/adapter/grants/test_seed_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from dbt.tests.adapter.grants.test_seed_grants import BaseSeedGrants
from tests.functional.adapter.grants.base_grants import BaseGrantsDremio
from tests.utils.util import relation_from_name
from dbt.tests.util import get_connection


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestSeedGrantsDremio(BaseGrantsDremio, BaseSeedGrants):

# Grants are reapplied if dbt run is ran twice without changes
Expand Down
1 change: 1 addition & 0 deletions tests/functional/adapter/grants/test_snapshot_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
""".strip()


@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
class TestSnapshotGrantsDremio(BaseGrantsDremio, BaseSnapshotGrants):
# Override this to use our modified snapshot model
@pytest.fixture(scope="class")
Expand Down

0 comments on commit 0a01f8a

Please sign in to comment.