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-375] Unique_key as list tests reformat #4882

Closed
1 task done
McKnight-42 opened this issue Mar 16, 2022 · 2 comments · Fixed by #4958
Closed
1 task done

[CT-375] Unique_key as list tests reformat #4882

McKnight-42 opened this issue Mar 16, 2022 · 2 comments · Fixed by #4958
Assignees
Labels
repo ci/cd Testing and continuous integration for dbt-core + adapter plugins Team:Adapters Issues designated for the adapter area of the code tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@McKnight-42
Copy link
Contributor

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

Next steps for work for #4858

  • Rewriting these tests to use the new pytest framework
  • Make them truly cross-database compatible (I think by turning expected models into seeds)
  • Add them to the inheritable adapter tests, and turn them on for Redshift + Snowflake + BigQuery + Spark. Delete the copy--pasted versions present in those repos :)

Describe alternatives you've considered

No response

Who will this benefit?

Tests will be much cleaner, and a lot less copy paste between repos

Are you interested in contributing this feature?

No response

Anything else?

No response

@McKnight-42 McKnight-42 added enhancement New feature or request tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality labels Mar 16, 2022
@McKnight-42 McKnight-42 changed the title [Feature] <title> unique_key tests reformat Mar 16, 2022
@github-actions github-actions bot changed the title unique_key tests reformat [CT-375] [Feature] <title> Mar 16, 2022
@McKnight-42 McKnight-42 changed the title [CT-375] [Feature] <title> [CT-375] Unique_key as list tests reformat Mar 16, 2022
@jtcohen6
Copy link
Contributor

Anticipated process for this work:

  1. Rewrite the test, added to this repo by update of macro for postgres/redshift use of unique_key as a list #4858, using new pytest framework
  2. Rewrite the logic to be database-agnostic, so the exact same code can run everywhere
  3. Move these tests into the "adapter testing zone" within this repo
  4. For each plugin: Inherit the test cases from the core repo, and delete the copy-pasted code that's currently in that plugin.
    • For Snowflake, we need to test with both incremental strategies: merge (default) + delete+insert

@jtcohen6 jtcohen6 added repo ci/cd Testing and continuous integration for dbt-core + adapter plugins Team:Adapters Issues designated for the adapter area of the code and removed enhancement New feature or request labels Mar 23, 2022
@jtcohen6
Copy link
Contributor

@leahwicz As discussed yesterday, we're thinking that the group doing this work might split and do it in parallel with another "adapter zone" test conversion.

My vote would be for test_docs_generate, which has proven especially obnoxious for us in the adapter plugins, requiring frequent copy-paste updates. I think we still want some testing for those capabilities in plugins, since catalog contents can vary. A nice exercise in pytest fixture overrides :)

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 Team:Adapters Issues designated for the adapter area of the code tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants