Skip to content

Commit

Permalink
initial implementation of redshift dbt_clone macros and test design a… (
Browse files Browse the repository at this point in the history
#505)

* initial implementation of redshift dbt_clone macros and test design attempts

* remove dbt_clone macros that are unneeded

* add clean_up method to drop alt schema names after tests run

* change pointer back to main
  • Loading branch information
McKnight-42 authored Jul 11, 2023
1 parent 693adb7 commit 0024261
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20230622-144649.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: add dbt-redshift portion of dbt_clone functionality
time: 2023-06-22T14:46:49.037145-05:00
custom:
Author: McKnight-42 aranke
Issue: "504"
20 changes: 20 additions & 0 deletions tests/functional/adapter/dbt_clone/test_dbt_clone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pytest
from dbt.tests.adapter.dbt_clone.test_dbt_clone import BaseCloneNotPossible


class TestRedshiftCloneNotPossible(BaseCloneNotPossible):
@pytest.fixture(autouse=True)
def clean_up(self, project):
yield
with project.adapter.connection_named("__test"):
relation = project.adapter.Relation.create(
database=project.database, schema=f"{project.test_schema}_seeds"
)
project.adapter.drop_schema(relation)

relation = project.adapter.Relation.create(
database=project.database, schema=project.test_schema
)
project.adapter.drop_schema(relation)

pass

0 comments on commit 0024261

Please sign in to comment.