-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add dbt test and fixtures #2580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bunch of nits/questions, but as long as CI passes this will be a big help.
def test_dbt_glaredb( | ||
glaredb_connection: psycopg2.extensions.connection, | ||
): | ||
dbt: dbtRunner = dbtRunner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you can just add this as an argument to the test to see if the magic pytest fixture thing works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you say more here? Are you suggesting I create a separate dbtRunner fixture?
tests/tests/test_dbt.py
Outdated
project_directory: str = "../fixtures/dbt_project/" # TODO | ||
dbt_profiles_directory: str = "../fixtures/dbt_project/" # TODO | ||
|
||
curr = glaredb_connection.cursor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context manager for cursors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I followed the pattern here. Should we update that?
This is messy, but works. I haven't updated dependencies or anything, but dbt is a dependency for this. Just want to get this shared before the weekend.