Skip to content

Conversation

@heaths
Copy link
Member

@heaths heaths commented Nov 12, 2025

Uses the include_file::include_markdown!() macro to include otherwise non-compilable Rust code snippets from the README.md files.

Uses the `include_file::include_markdown!()` macro to include otherwise non-compilable Rust code snippets from the README.md files.
Cleans up the test file nicely.
@heaths heaths marked this pull request as ready for review November 13, 2025 03:32
@heaths heaths requested a review from a team as a code owner November 13, 2025 03:32
Copilot AI review requested due to automatic review settings November 13, 2025 03:32
Copilot finished reviewing on behalf of heaths November 13, 2025 03:34
Copy link
Contributor

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 makes Key Vault README code samples compilable and testable by using the include_file::include_markdown!() macro. The changes allow README code snippets to be executed as part of the test suite, improving documentation accuracy and maintainability.

Key Changes

  • Adds test files for secrets, keys, and certificates that execute README code snippets using the include_markdown! macro
  • Updates README code blocks from rust no_run to rust ignore with named labels to enable extraction and testing
  • Adds include-file workspace dependency and includes it in the three affected Key Vault crates

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
sdk/keyvault/azure_security_keyvault_secrets/tests/readme.rs New test file executing README code snippets for secrets client
sdk/keyvault/azure_security_keyvault_secrets/README.md Refactored code samples to be testable with labeled rust ignore blocks
sdk/keyvault/azure_security_keyvault_secrets/Cargo.toml Added include-file dev dependency
sdk/keyvault/azure_security_keyvault_keys/tests/readme.rs New test file with custom rand module to override random number generation for deterministic testing
sdk/keyvault/azure_security_keyvault_keys/README.md Refactored code samples to be testable with labeled rust ignore blocks
sdk/keyvault/azure_security_keyvault_keys/Cargo.toml Added include-file and rand_chacha dev dependencies
sdk/keyvault/azure_security_keyvault_certificates/tests/readme.rs New test file executing README code snippets for certificates client
sdk/keyvault/azure_security_keyvault_certificates/README.md Refactored code samples to be testable with labeled rust ignore blocks
sdk/keyvault/azure_security_keyvault_certificates/Cargo.toml Added include-file dev dependency
sdk/keyvault/assets.json Updated assets tag to reflect test recording changes
Cargo.toml Added include-file to workspace dependencies
Cargo.lock Updated lock file with new dependencies and version updates

Had to trick cryptographic operations to use a recorded seed.
Also fixes up one paragraph in Secrets' README.md to be consistent with the others'.
@heaths heaths merged commit 4fdd7ba into Azure:main Nov 13, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Azure SDK for Key Vault Nov 13, 2025
@heaths heaths deleted the keyvault-samples branch November 13, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

KeyVault Key Vault

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants