Skip to content

chore(coderd/database/dbauthz): migrate more tests to mocked db #19300

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

Open
wants to merge 5 commits into
base: hugodutka/dbauthz-mock-1
Choose a base branch
from

Conversation

hugodutka
Copy link
Contributor

Related to coder/internal#869

blink-so bot and others added 4 commits August 11, 2025 17:55
…n OIDC claims, WorkspaceProxy, ProvisionerKeys)\n\n- Convert tests to s.Mocked\n- Add gomock expectations for fetch and authorized paths\n- Remove unused imports\n\nCo-authored-by: hugodutka <28019628+hugodutka@users.noreply.github.com>
- Convert DBCrypt subtests to s.Mocked with gomock expectations
- Remove reliance on real DB for setup
- Keeps consistent style with prior groups
- Convert CryptoKeys subtests to s.Mocked with gomock expectations
- Return proper values for methods that return rows
- Aligns with prior mocked migration groups
- Convert UserSecrets subtests to s.Mocked using gomock
- Add expectations for prefetch (GetUserSecret) and CRUD paths
- Aligns with recent mocked migrations for CryptoKeys/DBCrypt
@hugodutka hugodutka requested a review from Emyrk August 11, 2025 18:00
@hugodutka hugodutka changed the title chore(coderd/database/dbauthz): migrate License, Organization OIDC claims, WorkspaceProxy, and ProvisionerKeys tests to use mocked db chore(coderd/database/dbauthz): migrate License, Organization OIDC claims, WorkspaceProxy, and ProvisionerKeys tests Aug 11, 2025
@hugodutka hugodutka changed the title chore(coderd/database/dbauthz): migrate License, Organization OIDC claims, WorkspaceProxy, and ProvisionerKeys tests chore(coderd/database/dbauthz): migrate more tests to mocked db Aug 11, 2025
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.

1 participant