Skip to content

[azcertificate] add fakes support #24768

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 5 commits into from
Jun 12, 2025
Merged

Conversation

gracewilcox
Copy link
Member

Part of #23355

@gracewilcox gracewilcox added KeyVault Client This issue points to a problem in the data-plane of the library. labels Jun 10, 2025
@gracewilcox gracewilcox marked this pull request as ready for review June 11, 2025 00:05
@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 00:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for fakes in the azcertificates package and updates dependency versions, telemetry tracking, and naming consistency. Key changes include updating commit IDs and dependency versions, introducing fake implementations (including a fake tracker and custom server), and refactoring client operations to use a consistent telemetry pattern and parameter naming.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/security/keyvault/azcertificates/tsp-location.yaml Updated commit ID to reference the latest specification commit.
sdk/security/keyvault/azcertificates/testdata/perf/go.mod Upgraded dependency versions for improved compatibility and performance.
sdk/security/keyvault/azcertificates/internal/transforms.go Adjusted regexReplace calls (including adding a new one for fake/server.go) to support optional parameters.
sdk/security/keyvault/azcertificates/go.mod Upgraded dependency versions.
sdk/security/keyvault/azcertificates/fake/internal.go Added a fake tracker implementation and helper functions for fake responses.
sdk/security/keyvault/azcertificates/fake/custom_server.go Introduced custom server initialization for fake challenges.
sdk/security/keyvault/azcertificates/client.go Refactored telemetry and parameter naming (using a constant operationName and renaming issuerName to name).
sdk/security/keyvault/azcertificates/_metadata.json Bumped the emitterVersion.
eng/config.json Adjusted the coverage goal for the azcertificates module.
Comments suppressed due to low confidence (2)

sdk/security/keyvault/azcertificates/internal/transforms.go:31

  • [nitpick] Verify that the regex pattern and its replacement (?$1?) correctly capture and update the certificate version parameter as intended without affecting unintended strings.
regexReplace("fake/server.go", `(\(?P<certificate_version\>(.*?))\)`, `?$1?`)

sdk/security/keyvault/azcertificates/fake/custom_server.go:11

  • Ensure that 'serverTransportInterceptor' is declared (or imported) in the package prior to its assignment to avoid compilation errors.
serverTransportInterceptor = &internal.FakeChallenge{}

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure SDK for Key Vault Jun 12, 2025
@gracewilcox gracewilcox enabled auto-merge (squash) June 12, 2025 22:13
@gracewilcox gracewilcox merged commit f4bc762 into Azure:main Jun 12, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure SDK for Key Vault Jun 12, 2025
@gracewilcox gracewilcox deleted the kv-fakes-certs branch June 12, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants