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

170 add validation error if an unknown exception happens during validation #171

Conversation

jcadam14
Copy link
Contributor

Closes #170

@jcadam14 jcadam14 self-assigned this Apr 18, 2024
@jcadam14 jcadam14 linked an issue Apr 18, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Apr 18, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/sbl_filing_api/entities/models
  model_enums.py
  src/sbl_filing_api/services
  submission_processor.py
Project Total  

This report was generated by python-coverage-comment-action

Comment on lines 300 to 305
def test_migration_to_0040045eae14(alembic_runner: MigrationContext, alembic_engine: Engine):
alembic_runner.migrate_up_to("0040045eae14")


def test_migration_to_c89920be2e66(alembic_runner: MigrationContext, alembic_engine: Engine):
alembic_runner.migrate_up_to("c89920be2e66")
Copy link
Collaborator

@lchen-2101 lchen-2101 Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the scripts specific to postgres as sqlite doesn't support type changes, right? I don't think we need to have just the empty tests here then, I think the imports at the top of the file cover them already if we just want to make sure the scripts run, but not worrying about the results:

from pytest_alembic.tests import (
    test_single_head_revision,  # noqa: F401
    test_up_down_consistency,  # noqa: F401
    test_upgrade,  # noqa: F401
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok cool, yeah that was the purpose, just making sure the normal upgrade/downgrade alembic processes work, we don't have multiple heads, etc.

@jcadam14 jcadam14 requested a review from lchen-2101 April 23, 2024 20:43
Copy link
Collaborator

@lchen-2101 lchen-2101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lchen-2101 lchen-2101 merged commit 9614d28 into main Apr 24, 2024
3 checks passed
@lchen-2101 lchen-2101 deleted the 170-add-validation_error-if-an-unknown-exception-happens-during-validation branch April 24, 2024 14:49
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.

Add VALIDATION_ERROR if an unknown exception happens during validation
2 participants