dbt-labs / dbt-spark

dbt-spark contains all of the code enabling dbt to work with Apache Spark and Databricks
https://getdbt.com
Apache License 2.0
395 stars 221 forks source link

[Unit Testing] Add functional tests for unit testing: #987

Closed MichelleArk closed 7 months ago

MichelleArk commented 7 months ago

Is this your first time submitting a feature request?

Describe the feature

Add spark-specific tests that implement the 3 base unit testing functional tests:

  1. BaseUnitTestingTypes
    • Core issue: https://github.com/dbt-labs/dbt-core/issues/9467
    • Currently, the unit testing framework in core uses the safe_cast utils macro to convert a user-provided value for an input mock to the appropriate type. In some instances, this safe_cast may fail and need special handling depending on the type.
    • The acceptance criteria for this issue is to introduce a test that provides coverage across all primative input types (and arrays & objects if possible!) for unit testing input data, potentially updating the safe_cast macro as necessary.
  2. BaseUnitTestCaseInsensivity
  3. TestSparkUnitTestInvalidInput

Describe alternatives you've considered

n/a

Who will this benefit?

dbt users of dbt-spark or adapters that extend dbt-spark :)

Are you interested in contributing this feature?

yep!

Anything else?

N/A

MichelleArk commented 7 months ago

Resolved by: https://github.com/dbt-labs/dbt-spark/pull/976