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

Add constraints that account_number can't be an empty string #253

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

lavocatt
Copy link
Contributor

See #240

Copy link
Member

@croissanne croissanne left a comment

Choose a reason for hiding this comment

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

Thanks! Some thoughts

cmd/image-builder-db-test/main_test.go Show resolved Hide resolved
internal/db/migrations/3_add_alter_table_composes.up.sql Outdated Show resolved Hide resolved
internal/v1/server.go Outdated Show resolved Hide resolved
internal/tutils/idheader_utils.go Outdated Show resolved Hide resolved
internal/tutils/idheader_utils.go Outdated Show resolved Hide resolved
This commit adds a constraint on the database to make sure the account
number cannot be empty upon composes insertions.
Tests added with db tests on image-builder-db-test/main_test.go
Test the requirements of issue osbuild#240, the api cannot let an incoming
request pass without an empty accountNumber
Copy link
Member

@croissanne croissanne left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

For future reference, UnitTests: in the commit topic can point to the name of the module, so in this case v1, or server.

@croissanne croissanne enabled auto-merge (rebase) September 13, 2021 11:02
@croissanne croissanne merged commit 5c9f1c5 into osbuild:main Sep 13, 2021
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