Skip to content

chore(coderd/database/dbauthz): migrate TestTemplate to use mocked DB #19304

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

Merged
merged 3 commits into from
Aug 14, 2025

Conversation

hugodutka
Copy link
Contributor

Related to coder/internal#869

@hugodutka hugodutka changed the base branch from main to hugodutka/dbauthz-mock-5 August 11, 2025 18:29
@hugodutka hugodutka requested a review from Emyrk August 11, 2025 18:36
@hugodutka hugodutka force-pushed the hugodutka/dbauthz-mock-6 branch from d2c0096 to dced9ba Compare August 14, 2025 08:09
@hugodutka hugodutka changed the base branch from hugodutka/dbauthz-mock-5 to main August 14, 2025 08:09
@hugodutka
Copy link
Contributor Author

@Parkreiner, @aslilac the review requests went out automatically by mistake when I was rebasing. Sorry for the noise! I don't think you need to review this.

@hugodutka hugodutka force-pushed the hugodutka/dbauthz-mock-6 branch from a17ccb6 to 81111fb Compare August 14, 2025 09:06
@hugodutka hugodutka merged commit af97b78 into main Aug 14, 2025
31 checks passed
@hugodutka hugodutka deleted the hugodutka/dbauthz-mock-6 branch August 14, 2025 09:32
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
Comment on lines +1270 to +1273
tv := testutil.Fake(s.T(), faker, database.TemplateVersion{})
// uuid.NullUUID{Valid: false} is a zero value. faker overwrites zero values
// with random data, so we need to set TemplateID after faker is done with it.
tv.TemplateID = uuid.NullUUID{Valid: false}
Copy link
Member

Choose a reason for hiding this comment

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

👍

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

Successfully merging this pull request may close these issues.

2 participants