Skip to content

Commit

Permalink
skipif in all relevant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bcmeireles committed Jan 27, 2025
1 parent e3fb173 commit 180c4f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions tests/functional/adapter/grants/test_incremental_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import pytest, os

from dbt.tests.util import (
run_dbt_and_capture,
Expand All @@ -28,8 +28,9 @@
user2_incremental_model_schema_yml,
)

DREMIO_EDITION = os.getenv("DREMIO_EDITION")

@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
@pytest.mark.skipif(DREMIO_EDITION == "community", 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
5 changes: 3 additions & 2 deletions tests/functional/adapter/grants/test_invalid_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import pytest, os

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

DREMIO_EDITION = os.getenv("DREMIO_EDITION")

@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
@pytest.mark.skipif(DREMIO_EDITION == "community", 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
5 changes: 3 additions & 2 deletions tests/functional/adapter/grants/test_seed_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import pytest, os

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

DREMIO_EDITION = os.getenv("DREMIO_EDITION")

@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
@pytest.mark.skipif(DREMIO_EDITION == "community", 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
5 changes: 3 additions & 2 deletions tests/functional/adapter/grants/test_snapshot_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pytest
import pytest, os
from dbt.tests.adapter.grants.test_snapshot_grants import (
BaseSnapshotGrants,
snapshot_schema_yml,
Expand All @@ -36,8 +36,9 @@
{% endsnapshot %}
""".strip()

DREMIO_EDITION = os.getenv("DREMIO_EDITION")

@pytest.mark.skip(reason="Dremio only supports grants in EE/DC editions.")
@pytest.mark.skipif(DREMIO_EDITION == "community", 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 180c4f8

Please sign in to comment.