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

refactor: DBTP-1643 - Adding exceptions in ConfigValidator #745

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

chiaramapellimt
Copy link
Contributor

@chiaramapellimt chiaramapellimt commented Jan 29, 2025

Addresses DBTP-1643


Checklist:

Title:

  • Scope included as per conventional commits
  • Ticket reference included (unless it's a quick out of ticket thing)

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • If the work includes user interface changes, before and after screenshots included in description
  • Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

  • Run the end to end tests for this branch and confirm that they are passing

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
682 2 680 3
View the top 2 failed tests by shortest run time
tests/platform_helper/providers/test_config.py::test_validate_data_migration_fails_if_both_import_and_import_sources_present
Stack Traces | 0.03s run time
.../platform_helper/providers/test_config.py:166: in test_validate_data_migration_fails_if_both_import_and_import_sources_present
    assert mock_io.abort_with_error.assert_called_with(
.../hostedtoolcache/Python/3.12.8.../x64/lib/python3.12/unittest/mock.py:949: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: abort_with_error("Error: in 'test-s3-bucket.environments.dev.data_migration': only the 'import_sources' property is required - 'import' is deprecated.")
E     Actual: abort_with_error('Config validation has failed', ConfigValidatorError("Error in 'test-s3-bucket.environments.dev.data_migration': only the 'import_sources' property is required - 'import' is deprecated."))
tests/platform_helper/providers/test_config.py::test_validate_data_migration_fails_if_neither_import_nor_import_sources_present
Stack Traces | 0.031s run time
.../platform_helper/providers/test_config.py:118: in test_validate_data_migration_fails_if_neither_import_nor_import_sources_present
    assert mock_io.abort_with_error.assert_called_with(
.../hostedtoolcache/Python/3.12.8.../x64/lib/python3.12/unittest/mock.py:940: in assert_called_with
    raise AssertionError(error_message)
E   AssertionError: expected call not found.
E   Expected: abort_with_error("Error: 'import_sources' property in 'test-s3-bucket.environments.dev.data_migration' is missing.")
E     Actual: not called.

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants