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

Improve constraint assertions #240

Merged
merged 4 commits into from
Jan 17, 2024
Merged

Conversation

andrew-farries
Copy link
Collaborator

Add more precise test assertions for constraints and foreign key existence.

Previously there was one ConstraintMustExist assertion that served for all kinds constraints. This PR adds:

  • CheckConstraintMustExist
  • ValidatedForeignKeyMustExist
  • NotValidatedForeignKeyMustExist

and updates tests to use each, as appropriate.

Be more precise about whether a `VALID` or `NOT VALID` foreign key is
expected.
Ensure that a constraint with the expected name is present on the table.
Change the assertion to look for `CHECK` constraints and rename the
assertion functions accordingly.
@andrew-farries andrew-farries merged commit 7b5fafd into main Jan 17, 2024
24 checks passed
@andrew-farries andrew-farries deleted the improve-constraint-assertions branch January 17, 2024 09:16
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.

None yet

2 participants