Skip to content

Commit

Permalink
update test schema handling
Browse files Browse the repository at this point in the history
  • Loading branch information
case-k-git committed Jan 9, 2024
1 parent 4f3fb42 commit 2d59088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 6 additions & 2 deletions tests/integration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ def packages_config(self):
def selectors_config(self):
return None

# pass profile setting schema and test passed schema. Should not be make lower case to test upper case
# To test schema related test lower or upper, we can chose if we want to use the default schema or the test define schema
def unique_schema(self, schema=None):
if hasattr(self, 'schema'):
schema = self.schema
return "{}_{}".format(self.prefix, schema)
if schema is None:
return self.config.credentials.schema
return "{}_{}".format(self.prefix, schema)
Expand All @@ -193,7 +196,8 @@ def get_profile(self, adapter_type):
"target": "dev",
},
}
profile["test"]["outputs"]["dev"]["schema"] = self.unique_schema(schema = profile["test"]["outputs"]["dev"]["schema"])
if 'schema' in profile["test"]["outputs"]["dev"]:
profile["test"]["outputs"]["dev"]["schema"] = self.unique_schema(schema = profile["test"]["outputs"]["dev"]["schema"])
return profile

def _pick_profile(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@


class TestIncrementalOnSchemaChange(DBTIntegrationTest):
@property
def schema(self):
return "incremental_on_schema_change"

@property
def models(self):
Expand Down

0 comments on commit 2d59088

Please sign in to comment.