-
Notifications
You must be signed in to change notification settings - Fork 907
[azadmin] add fakes support #24769
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
[azadmin] add fakes support #24769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for fake servers and comprehensive tests for both the RBAC and BackupRestore clients, along with necessary client changes to enable request dispatch via context.
- Introduces
fake.Server
implementations and tests inrbac/fake
andbackup/fake
packages - Updates client methods to set
runtime.CtxAPINameKey
for dispatch in test transports - Bumps dependencies, tooling (goimports), emitter versions, and adjusts coverage goals
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
sdk/security/keyvault/azadmin/rbac/fake/server_test.go | New RBAC fake server tests for Create/Get/Delete operations |
sdk/security/keyvault/azadmin/rbac/fake/internal.go | Generic tracker and utility functions for fake servers |
sdk/security/keyvault/azadmin/rbac/client.go | Client methods updated to use CtxAPINameKey in context for spans |
sdk/security/keyvault/azadmin/backup/fake/server.go | New Backup fake server with poller dispatch logic |
sdk/security/keyvault/azadmin/backup/fake/internal.go | Shared tracker implementation for backup fake server transport |
Comments suppressed due to low confidence (2)
sdk/security/keyvault/azadmin/rbac/fake/server_test.go:20
- [nitpick] The variable
name
is too generic and conflicts with builtins; consider renaming totestName
orroleName
for clarity.
name = "name"
sdk/security/keyvault/azadmin/backup/fake/internal.go:36
- Consider adding unit tests for
newTracker
,get
,add
, andremove
methods to verify correct tracking behavior and thread safety under concurrent requests.
func newTracker[T any]() *tracker[T] {
Part of #23355