Skip to content
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

[CT-2269] Add schema_string_type fixture to BaseConstraintsColumnsEqual #7121

Closed
Tracked by #6747
MichelleArk opened this issue Mar 4, 2023 · 0 comments · Fixed by #7229
Closed
Tracked by #6747

[CT-2269] Add schema_string_type fixture to BaseConstraintsColumnsEqual #7121

MichelleArk opened this issue Mar 4, 2023 · 0 comments · Fixed by #7229
Assignees
Labels
repo ci/cd Testing and continuous integration for dbt-core + adapter plugins

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Mar 4, 2023

Currently, test__constraints_wrong_column_data_types assumes the error message type and schema type for an adapter's string type are always the same. On some adapters (like spark!) this is not the case (e.g. valid schema.yml data_type is 'string', error message is 'STR' or 'STRING_TYPE' .

This makes it difficult to test string types themselves in adapter overrides of this method.

To fix this, add an overridable schema_string_type fixture to BaseConstraintsColumnsEqual (can default to string_type), so that it can be overwritten in adapters that have variation between the string schema type and error message. schema_string_type should be used to set wrong_schema_data_type in BaseConstraintsColumnsEqual.test__constraints_wrong_column_data_types.

@MichelleArk MichelleArk added the repo ci/cd Testing and continuous integration for dbt-core + adapter plugins label Mar 4, 2023
@MichelleArk MichelleArk self-assigned this Mar 4, 2023
@github-actions github-actions bot changed the title Add schema_int_type fixture to BaseConstraintsColumnsEqual [CT-2269] Add schema_int_type fixture to BaseConstraintsColumnsEqual Mar 4, 2023
@MichelleArk MichelleArk changed the title [CT-2269] Add schema_int_type fixture to BaseConstraintsColumnsEqual [CT-2269] Add schema_string_type fixture to BaseConstraintsColumnsEqual Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repo ci/cd Testing and continuous integration for dbt-core + adapter plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant