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

Merged
merged 8 commits into from
Aug 20, 2025

Conversation

hugodutka
Copy link
Contributor

Related to coder/internal#869

@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
Base automatically changed from hugodutka/dbauthz-mock-1 to main August 13, 2025 14:30
blink-so bot and others added 5 commits August 14, 2025 08:16
…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 force-pushed the hugodutka/dbauthz-mock-2 branch from b615cb1 to d5f03c2 Compare August 14, 2025 08:24
@Emyrk Emyrk enabled auto-merge (squash) August 20, 2025 13:57
@Emyrk Emyrk merged commit d536b91 into main Aug 20, 2025
31 checks passed
@Emyrk Emyrk deleted the hugodutka/dbauthz-mock-2 branch August 20, 2025 14:10
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2025
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy